Skip to content

Commit

Permalink
Merge pull request #69 from devlinx9/Fixes/PassphraseDialogForPK
Browse files Browse the repository at this point in the history
Fix NullPointerException in the Passphrase dialog for private key
  • Loading branch information
devlinx9 authored Feb 7, 2022
2 parents 7cc6ce5 + 2bb2200 commit 7737905
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public char[] reqPassword(Resource<?> resource) {
JPasswordField txtPass = new JPasswordField();
JCheckBox chkUseCache = new JCheckBox("Remember for this session");

int ret = JOptionPane.showOptionDialog(null, new Object[]{resource.toString(), txtPass, chkUseCache},
int ret = JOptionPane.showOptionDialog(null,
new Object[]{resource!=null?resource.toString(): "Private key passphrase:", txtPass, chkUseCache},
"Passphrase", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, null, null);
if (ret == JOptionPane.OK_OPTION) {
char[] passPhrase = txtPass.getPassword();
Expand Down

0 comments on commit 7737905

Please sign in to comment.