Browse Source

Check that we own the validator before nulling it out

See gh-4734
pull/4753/head
Dave Syer 10 years ago
parent
commit
fae14b409f
  1. 2
      spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java

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

@ -205,7 +205,7 @@ public class ConfigurationPropertiesBindingPostProcessor @@ -205,7 +205,7 @@ public class ConfigurationPropertiesBindingPostProcessor
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
if (this.validator != null && isJsr303Present()) {
if (this.ownedValidator && this.validator != null && isJsr303Present()) {
this.validator = null; // allow it to be garbage collected
}
}

Loading…
Cancel
Save