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

Commit

Permalink
[1065461] readOnly configuration is editable via CLI
Browse files Browse the repository at this point in the history
- an NPE fix to prior commit 1b551ae
  • Loading branch information
jshaughn committed Apr 23, 2014
1 parent 949ad3c commit 0a68d68
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,14 +388,12 @@ private static void validatePropertySimple(PropertyDefinition propertyDefinition
private static void validatePropertyMap(AbstractPropertyMap propertyMap, AbstractPropertyMap currentPropertyMap,
PropertyDefinitionMap propertyDefinitionMap, List<String> errorMessages) {
// if the entire map is read-only then the new map must match the current map if the current map is non-empty
if (propertyDefinitionMap.isReadOnly()) {
if (!currentPropertyMap.getMap().isEmpty()) {
if (!propertyMap.getMap().equals(currentPropertyMap.getMap())) {
errorMessages.add("ReadOnly property '" + propertyDefinitionMap.getName() + "' has a value "
+ propertyMap.getMap() + " different than the current value " + currentPropertyMap.getMap()
+ "]. It is not allowed to change.");
return;
}
if (propertyDefinitionMap.isReadOnly() && null != currentPropertyMap && !currentPropertyMap.getMap().isEmpty()) {
if (!propertyMap.getMap().equals(currentPropertyMap.getMap())) {
errorMessages.add("ReadOnly property '" + propertyDefinitionMap.getName() + "' has a value "
+ propertyMap.getMap() + " different than the current value " + currentPropertyMap.getMap()
+ "]. It is not allowed to change.");
return;
}
}

Expand Down

0 comments on commit 0a68d68

Please sign in to comment.