mirror of
https://github.com/lightbend/config.git
synced 2025-04-15 05:30:43 +08:00
Assume the bean property has an associated field.
This commit is contained in:
parent
13c5fc057e
commit
ff94f4b731
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user