rootnomad commented on code in PR #14140:
URL: https://github.com/apache/cloudstack/pull/14140#discussion_r4381386135


##########
server/src/main/java/com/cloud/resourcelimit/ResourceLimitManagerImpl.java:
##########
@@ -931,7 +931,7 @@ public ResourceLimitVO updateResourceLimit(Long accountId, 
Long domainId, Intege
             }
 
             //only Unlimited value is accepted if account is  Root Admin
-            if (_accountMgr.isRootAdmin(account.getId()) && max.shortValue() 
!= Resource.RESOURCE_UNLIMITED) {
+            if (_accountMgr.isRootAdmin(account.getId()) && max != 
Resource.RESOURCE_UNLIMITED) {

Review Comment:
   Good call, thanks. Added the explicit `(long)` cast in 219aeb0 so the long 
comparison is obvious at a glance. `max` is a `Long`, so it already compared as 
long once `shortValue()` was gone, but this reads better.



-- 
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