Index: kernel-impl/src/test/java/org/sakaiproject/component/impl/BasicConfigurationServiceTest.java =================================================================== --- kernel-impl/src/test/java/org/sakaiproject/component/impl/BasicConfigurationServiceTest.java (revision 130729) +++ kernel-impl/src/test/java/org/sakaiproject/component/impl/BasicConfigurationServiceTest.java (working copy) @@ -251,6 +251,13 @@ basicConfigurationService.addConfigItem( new ConfigItemImpl("booleanVal3", null), SOURCE); booleanValue = basicConfigurationService.getBoolean("booleanVal3", true); // value is null assertEquals(true, booleanValue); + + // NOTE: this is internal only (i.e. no one outside the kernel could encounter this) + ConfigItemImpl booleanVal4 = new ConfigItemImpl("booleanVal4", null); + booleanVal4.setDefaultValue(""); // causes an NPE + basicConfigurationService.addConfigItem( booleanVal4, SOURCE); + boolean booleanValue4 = basicConfigurationService.getBoolean("booleanVal4", false); + assertEquals(false, booleanValue4); } } Index: kernel-impl/src/main/java/org/sakaiproject/component/impl/BasicConfigurationService.java =================================================================== --- kernel-impl/src/main/java/org/sakaiproject/component/impl/BasicConfigurationService.java (revision 130729) +++ kernel-impl/src/main/java/org/sakaiproject/component/impl/BasicConfigurationService.java (working copy) @@ -692,7 +692,7 @@ { String value = getString(name); - if (value.length() == 0) return dflt; + if (StringUtils.isEmpty(value)) return dflt; return Integer.parseInt(value); } @@ -704,7 +704,7 @@ { String value = getString(name); - if (value.length() == 0) return dflt; + if (StringUtils.isEmpty(value)) return dflt; return Boolean.valueOf(value).booleanValue(); }