mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Cherry-pick 398d06e
Fixed initially in #3725 The target attribute is effectively checked for null beforehand so this additional defensive check can be removed. Closes gh-4567
This commit is contained in:
parent
c605675b7a
commit
d9f09e46f8
@ -297,10 +297,7 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
|
||||
factory.bindPropertiesToTarget();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
String targetClass = "[unknown]";
|
||||
if (target != null) {
|
||||
ClassUtils.getShortName(target.getClass());
|
||||
}
|
||||
String targetClass = ClassUtils.getShortName(target.getClass());
|
||||
throw new BeanCreationException(beanName, "Could not bind properties to "
|
||||
+ targetClass + " (" + getAnnotationDetails(annotation) + ")", ex);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user