This is an automated email from the ASF dual-hosted git repository.

nvazquez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new 83dd294  remove doubles before save (#5341)
83dd294 is described below

commit 83dd294940f30ad5b81fcae3dea7c2e2041d4225
Author: DK101010 <[email protected]>
AuthorDate: Tue Aug 24 06:13:31 2021 +0200

    remove doubles before save (#5341)
    
    * remove doubles before save
    
    * Update ResourceManagerImpl.java
    
    adding final statement
    
    Co-authored-by: DK101010 <[email protected]>
---
 server/src/main/java/com/cloud/resource/ResourceManagerImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java 
b/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java
index ad0190f..4731ac6 100755
--- a/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java
+++ b/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java
@@ -196,6 +196,7 @@ import com.cloud.vm.VmDetailConstants;
 import com.cloud.vm.dao.UserVmDetailsDao;
 import com.cloud.vm.dao.VMInstanceDao;
 import com.google.gson.Gson;
+import java.util.HashSet;
 
 @Component
 public class ResourceManagerImpl extends ManagerBase implements 
ResourceManager, ResourceService, Manager {
@@ -1748,13 +1749,12 @@ public class ResourceManagerImpl extends ManagerBase 
implements ResourceManager,
                 }
             }
         }
-
         final List<String> hostTags = cmd.getHostTags();
         if (hostTags != null) {
             if (s_logger.isDebugEnabled()) {
                 s_logger.debug("Updating Host Tags to :" + hostTags);
             }
-            _hostTagsDao.persist(hostId, hostTags);
+            _hostTagsDao.persist(hostId, new ArrayList(new 
HashSet<String>(hostTags)));
         }
 
         final String url = cmd.getUrl();

Reply via email to