supprot 1 as true for boolean setting

This commit is contained in:
kimchy 2010-02-18 23:11:10 +02:00
parent e195ec6295
commit f7d152821d
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ public class ImmutableSettings implements Settings {
return defaultValue; return defaultValue;
} }
try { try {
return Boolean.valueOf(sValue); return sValue.equals("true") || sValue.equals("1");
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
throw new SettingsException("Failed to parse boolean setting [" + setting + "] with value [" + sValue + "]", e); throw new SettingsException("Failed to parse boolean setting [" + setting + "] with value [" + sValue + "]", e);
} }