Skip to content

Commit 7f8a8ba

Browse files
committed
Properly handle null package
Closes gh-9621
1 parent 41e6037 commit 7f8a8ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,8 @@ public boolean supports(Class<?> type) {
420420
if (AnnotatedElementUtils.hasAnnotation(type, Validated.class)) {
421421
return true;
422422
}
423-
if (type.getPackage().getName().startsWith("org.springframework.boot")) {
423+
if (type.getPackage() != null &&
424+
type.getPackage().getName().startsWith("org.springframework.boot")) {
424425
return false;
425426
}
426427
if (getConstraintsForClass(type).isBeanConstrained()) {

0 commit comments

Comments
 (0)