Assume the bean property has an associated field.

This commit is contained in:
Karthick Sankarachary 2016-05-31 12:47:33 -07:00
parent 13c5fc057e
commit ff94f4b731

View File

@ -269,9 +269,6 @@ public class ConfigBeanImpl {
private static boolean isOptionalProperty(Class beanClass, PropertyDescriptor beanProp) {
Field field = getField(beanClass, beanProp.getName());
if (field == null) {
throw new ConfigException.BadBean("Bean property '" + beanProp + "' of class " + beanClass.getName() + " does not exist");
}
return (field.getAnnotationsByType(Optional.class).length > 0);
}