cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rafaelweingartner commented on a change in pull request #905: BUG-ID: CLOUDSTACK-8922: Unable to delete IP tag
Date Thu, 01 Jan 1970 00:00:00 GMT
rafaelweingartner commented on a change in pull request #905: BUG-ID: CLOUDSTACK-8922:  Unable
to delete IP tag
URL: https://github.com/apache/cloudstack/pull/905#discussion_r152689285
 
 

 ##########
 File path: server/src/com/cloud/tags/TaggedResourceManagerImpl.java
 ##########
 @@ -360,6 +348,53 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
         return true;
     }
 
+    private List<? extends ResourceTag>  getResourceTags(final List<String> resourceIds,
ResourceObjectType resourceType) {
+
+        List<String> uuids = new ArrayList<String>();
+        List<String> internalIds = new ArrayList<String>();
+        for(String resourceId : resourceIds){
+            if(resourceId.matches("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")){
 
 Review comment:
   What about simplifying this ?
   You can use `org.apache.commons.lang.math.NumberUtils.isDigits(String)`, to check if you
have a long there, then you can convert it directly to Long, otherwise, you can check if it
empty using `org.apache.commons.lang3.StringUtils.isNotBlank(CharSequence)`, and if it is
not blank, you can add in the UUID list.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message