vishesh92 commented on code in PR #12708:
URL: https://github.com/apache/cloudstack/pull/12708#discussion_r3965605418


##########
utils/src/main/java/com/cloud/utils/ssh/SSHKeysHelper.java:
##########
@@ -105,17 +110,53 @@ public static String getPublicKeyFromKeyMaterial(String 
keyMaterial) {
     }
 
     public String getPublicKey() {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        keyPair.writePublicKey(baos, "");
+        if (keyPair == null || keyPair.getPublic() == null) {

Review Comment:
   should we return empty string instead of null? The only reason being that we 
never sent null earlier and I am not sure if that will break anything.



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