Skip to content

Commit 15d4764

Browse files
dreis2211wilkinsona
authored andcommitted
Avoid bindable properties check when target has null value
See gh-16447
1 parent 38f21a1 commit 15d4764

File tree

1 file changed

+1
-1
lines changed
  • spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind

1 file changed

+1
-1
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/JavaBeanBinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class JavaBeanBinder implements DataObjectBinder {
4545
@Override
4646
public <T> T bind(ConfigurationPropertyName name, Bindable<T> target, Context context,
4747
DataObjectPropertyBinder propertyBinder) {
48-
boolean hasKnownBindableProperties = hasKnownBindableProperties(name, context);
48+
boolean hasKnownBindableProperties = target.getValue() != null && hasKnownBindableProperties(name, context);
4949
Bean<T> bean = Bean.get(target, hasKnownBindableProperties);
5050
if (bean == null) {
5151
return null;

0 commit comments

Comments
 (0)