zeroflag commented on code in PR #581:
URL: https://github.com/apache/knox/pull/581#discussion_r883106816


##########
gateway-server/src/test/java/org/apache/knox/gateway/services/security/impl/RemoteAliasServiceTestProvider.java:
##########
@@ -88,7 +88,8 @@ public void removeAliasesForCluster(String clusterName, 
Set<String> aliases) thr
 
     @Override
     public char[] getPasswordFromAliasForCluster(String clusterName, String 
alias) {
-      return aliases.getOrDefault(clusterName, new 
HashMap<>()).get(alias).toCharArray();
+      String value = aliases.getOrDefault(clusterName, new 
HashMap<>()).get(alias);
+      return value == null ? null : value.toCharArray();

Review Comment:
   It is because of the new test (this is also test code). We simulate that 
there is no password yet and check if the password was generated.



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