Remove useless code
The target attribute is effectively checked for null beforehand so this additional defensive check can be removed. Closes gh-3725
This commit is contained in:
parent
56115b9baa
commit
398d06e326
|
|
@ -298,10 +298,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