Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Fix NPE when ENABLED_ATTRIBUTE is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Jul 29, 2014
1 parent 12c727d commit 58369f1
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -275,10 +275,13 @@ public void updateResourceConfiguration(final ConfigurationUpdateReport configur
return;
}

Boolean enabledAttributeConfigValue = config.getSimple(ENABLED_ATTRIBUTE).getBooleanValue();
if (enabledAttributeConfigValue == null) {
PropertySimple enabledAttributeSimpleConfigValue = config.getSimple(ENABLED_ATTRIBUTE);
Boolean enabledAttributeConfigValue = null;
if(enabledAttributeSimpleConfigValue == null) {
// True if unset
enabledAttributeConfigValue = TRUE;
} else {
enabledAttributeConfigValue = enabledAttributeSimpleConfigValue.getBooleanValue();
}

// Check if the datasource is currently enabled
Expand Down

0 comments on commit 58369f1

Please sign in to comment.