Browse Source

Properly handle `null` package

Closes gh-9621
pull/9654/head
Stephane Nicoll 9 years ago
parent
commit
7f8a8ba115
  1. 3
      spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java

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

@ -420,7 +420,8 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc @@ -420,7 +420,8 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
if (AnnotatedElementUtils.hasAnnotation(type, Validated.class)) {
return true;
}
if (type.getPackage().getName().startsWith("org.springframework.boot")) {
if (type.getPackage() != null &&
type.getPackage().getName().startsWith("org.springframework.boot")) {
return false;
}
if (getConstraintsForClass(type).isBeanConstrained()) {

Loading…
Cancel
Save