Skip to content

Commit 8e6a3bd

Browse files
committed
simplify if check
1 parent 04013f2 commit 8e6a3bd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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)