ravening commented on a change in pull request #4359:
URL: https://github.com/apache/cloudstack/pull/4359#discussion_r506177567



##########
File path: server/src/main/java/com/cloud/server/ManagementServerImpl.java
##########
@@ -3938,7 +3938,12 @@ public void doInTransactionWithoutResult(final 
TransactionStatus status) {
                     }
                     // update password for this host
                     final DetailVO nv = _detailsDao.findDetail(h.getId(), 
ApiConstants.USERNAME);
-                    if (nv.getValue().equals(command.getUsername())) {
+                    if (nv == null) {
+                        final DetailVO nvu = new DetailVO(h.getId(), 
ApiConstants.USERNAME, command.getUsername());

Review comment:
       > @ravening username is not null, but empty string, so can you add check 
for that ? Ex: "_StringUtils.isBlank(command.getUsername())_" 
   
   @sureshanaparti but why? For some hosts, username and password can be empty 
string




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