Skip to content

Commit 5c18873

Browse files
committed
simplify if check
1 parent 72e53f0 commit 5c18873

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -885,10 +885,8 @@ public Pair<Configuration, String> resetConfiguration(final ResetCfgCmd cmd) thr
885885
throw new InvalidParameterValueException("cannot handle multiple IDs, provide only one ID corresponding to the scope");
886886
}
887887

888-
if (scope != null && !scope.equals(ConfigKey.Scope.Global.toString())) {
889-
if (!configScope.contains(scope) && !(configScope.contains(ConfigKey.Scope.Account.toString()) && scope.equals(ConfigKey.Scope.Domain.toString()))) {
890-
throw new InvalidParameterValueException("Invalid scope id provided for the parameter " + name);
891-
}
888+
if (scope != null && !scope.equals(ConfigKey.Scope.Global.toString()) && !configScope.contains(scope)) {
889+
throw new InvalidParameterValueException("Invalid scope id provided for the parameter " + name);
892890
}
893891

894892
String newValue = null;

0 commit comments

Comments
 (0)