harikrishna-patnala commented on code in PR #7368:
URL: https://github.com/apache/cloudstack/pull/7368#discussion_r1148805763


##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -2607,6 +2608,14 @@ private Pair<List<StoragePoolJoinVO>, Integer> 
searchForStoragePoolsInternal(Lis
                 throw new InvalidParameterValueException("Invalid scope type: 
" + cmd.getScope());
             }
         }
+        StoragePoolStatus state = null;
+        if (cmd.getState() != null && 
EnumUtils.isValidEnumIgnoreCase(StoragePoolStatus.class, cmd.getState())) {

Review Comment:
   I think with this flow, state will be skipped if invalid value is passed, it 
won't enter catch since we are validating before getting the value.
   How about validating the value and throw exception if it is invalid (before 
getEnumIgnoreCase) !



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to