Skip to content

Commit

Permalink
Fix two minor compiler warnings
Browse files Browse the repository at this point in the history
Adding serialVersionUID to exception class (all exceptions are
serializable by inheritance)

Add a wildcard type parameter to Class array construction to remove warn
about raw type.
  • Loading branch information
runeflobakk committed Sep 8, 2024
1 parent 621d1ca commit 44979ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public JaxbMarshaller(MarshallingCustomization marshallingCustomization, Class<?
}

public JaxbMarshaller(MarshallingCustomization marshallingCustomization, Set<Class<?>> classesToBeBound) {
this(marshallingCustomization, classesToBeBound.toArray(new Class[classesToBeBound.size()]));
this(marshallingCustomization, classesToBeBound.toArray(new Class<?>[classesToBeBound.size()]));
}

public JaxbMarshaller(Class<?> ... classesToBeBound) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

public class MarshallingException extends RuntimeException {

private static final long serialVersionUID = 1L;

public static MarshallingException failedUnmarshal(Class<?> target, Throwable cause) {
return new MarshallingException("Failed unmarshalling XML to " + target.getName(), cause);
}
Expand Down

0 comments on commit 44979ff

Please sign in to comment.