mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 15:20:54 +03:00
Fix NPE in OpenSSHKnownHosts (#579)
Co-authored-by: Vladimir Lagunov <vladimir.lagunov@jetbrains.com>
This commit is contained in:
@@ -387,7 +387,7 @@ public class OpenSSHKnownHosts
|
||||
line.append(" ").append(type.toString());
|
||||
line.append(" ").append(getKeyString(key));
|
||||
|
||||
if (!comment.isEmpty()) line.append(" ").append(comment);
|
||||
if (comment != null && !comment.isEmpty()) line.append(" ").append(comment);
|
||||
|
||||
return line.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user