/[projects]/WebConfig/src/dk/thoerup/webconfig/ConfigLoader.java
ViewVC logotype

Diff of /WebConfig/src/dk/thoerup/webconfig/ConfigLoader.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1345 by torben, Wed Apr 20 15:19:32 2011 UTC revision 1346 by torben, Wed Apr 20 17:16:28 2011 UTC
# Line 21  abstract public class ConfigLoader { Line 21  abstract public class ConfigLoader {
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() );

Legend:
Removed from v.1345  
changed lines
  Added in v.1346

  ViewVC Help
Powered by ViewVC 1.1.20