Skip to content
Snippets Groups Projects
Commit 30a78048 authored by srosse's avatar srosse
Browse files

no-jira: ClassCastException in ModuleConfiguration for Boolean

parent 979c6cca
No related branches found
No related tags found
No related merge requests found
......@@ -102,8 +102,9 @@ public class ModuleConfiguration implements Serializable {
*/
public Boolean getBooleanEntry(String config_key) {
// boolean are stored either as null (no val yet), "true", or "false" (Strings)
String val = (String) get(config_key);
Object val = get(config_key);
if (val == null) return null;
if( val instanceof Boolean) return (Boolean)val;
Boolean set = val.equals("true")? Boolean.TRUE : Boolean.FALSE;
return set;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment