Fix BindingReflectionHintsRegistrar anonymous classes support
This commit ensures that giving an anonymous class for reflection hints registration does not result in a NullPointerException, since the canonical name of anonymous classes is null. Fixes gh-29657
This commit is contained in:
@@ -71,7 +71,7 @@ public class BindingReflectionHintsRegistrar {
|
||||
}
|
||||
|
||||
private boolean shouldSkipMembers(Class<?> type) {
|
||||
return type.getCanonicalName().startsWith("java.") || type.isArray();
|
||||
return (type.getCanonicalName() != null && type.getCanonicalName().startsWith("java.")) || type.isArray();
|
||||
}
|
||||
|
||||
private void registerReflectionHints(ReflectionHints hints, Set<Type> seen, Type type) {
|
||||
|
||||
Reference in New Issue
Block a user