Skip to content

Commit

Permalink
Fix compiling error
Browse files Browse the repository at this point in the history
  • Loading branch information
ccidral committed Feb 22, 2011
1 parent 754a8ec commit ac8c26d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/tomighty/config/Configuration.java
Expand Up @@ -47,12 +47,13 @@ public boolean asBoolean(String name, boolean defaultValue) {
return value == null ? defaultValue : Boolean.parseBoolean(value);
}

@SuppressWarnings("unchecked")
public <T> T asObject(String name, Class<T> defaultClass) {
String className = properties.getProperty(name);
if(className == null) {
return container.get(defaultClass);
}
return container.get(className);
return (T) container.get(className);
}

public void set(String name, boolean value) {
Expand Down

0 comments on commit ac8c26d

Please sign in to comment.