21 |
ConfigVariable anno = field.getAnnotation(ConfigVariable.class); |
ConfigVariable anno = field.getAnnotation(ConfigVariable.class); |
22 |
if (anno == null) |
if (anno == null) |
23 |
continue; |
continue; |
24 |
|
|
25 |
|
String propertyName = anno.propertyname().equals("") ? field.getName() : anno.propertyname(); |
26 |
|
|
27 |
String value = getValue( field.getName() ); |
String value = getValue( propertyName ); |
28 |
if (value == null) { |
if (value == null) { |
29 |
//TODO: find another exception to throw here |
//TODO: find another exception to throw here |
30 |
throw new RuntimeException("Could not find a value to this field: " + field.getName() ); |
throw new RuntimeException("Could not find a value to this field: " + field.getName() ); |