diff --git a/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java b/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java index 38b5689ae3..5c9a2a2bc5 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java @@ -322,15 +322,15 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc } private Validator determineValidator(Object bean) { - boolean globalValidatorSupportBean = (this.validator != null - && this.validator.supports(bean.getClass())); + boolean globalValidatorSupportBean = (this.validator != null && this.validator + .supports(bean.getClass())); if (ClassUtils.isAssignable(Validator.class, bean.getClass())) { if (!globalValidatorSupportBean) { return (Validator) bean; } return new ChainingValidator(this.validator, (Validator) bean); } - return globalValidatorSupportBean ? this.validator : null; + return (globalValidatorSupportBean ? this.validator : null); } private PropertySources loadPropertySources(String[] locations, diff --git a/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessorTests.java b/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessorTests.java index dcf30a8e62..f53d16cd8c 100644 --- a/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessorTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessorTests.java @@ -429,7 +429,7 @@ public class ConfigurationPropertiesBindingPostProcessorTests { private String foo; public String getFoo() { - return foo; + return this.foo; } public void setFoo(String foo) {