Merge pull request #16447 from dreis2211

* gh-16447:
  Avoid bindable properties check when target has null value

Closes gh-16447
This commit is contained in:
Andy Wilkinson
2019-07-01 17:13:14 +01:00

View File

@@ -45,7 +45,7 @@ class JavaBeanBinder implements DataObjectBinder {
@Override
public <T> T bind(ConfigurationPropertyName name, Bindable<T> target, Context context,
DataObjectPropertyBinder propertyBinder) {
boolean hasKnownBindableProperties = hasKnownBindableProperties(name, context);
boolean hasKnownBindableProperties = target.getValue() != null && hasKnownBindableProperties(name, context);
Bean<T> bean = Bean.get(target, hasKnownBindableProperties);
if (bean == null) {
return null;