GutoVeronezi commented on a change in pull request #4789:
URL: https://github.com/apache/cloudstack/pull/4789#discussion_r597073194



##########
File path: server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java
##########
@@ -274,12 +269,19 @@ public HostResponse newHostResponse(HostJoinVO host, 
EnumSet<HostDetails> detail
     @Override
     public HostResponse setHostResponse(HostResponse response, HostJoinVO 
host) {
         String tag = host.getTag();
-        if (tag != null) {
-            if (response.getHostTags() != null && 
response.getHostTags().length() > 0) {
+        if (StringUtils.isNotEmpty(tag)) {
+            if (StringUtils.isNotEmpty(response.getHostTags())) {
                 response.setHostTags(response.getHostTags() + "," + tag);
             } else {
                 response.setHostTags(tag);
             }
+
+            if (!Boolean.TRUE.equals(response.getHaHost())) {

Review comment:
       @shwstppr 
   I do not see any technical reason to keep a `negation of a TRUE` when we 
could simply use `FALSE`, besides that it goes against KISS principle; but it 
is my opinion against yours, in your PR, so I have nothing more to say.




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

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


Reply via email to