diff options
author | Jose <jose@zeroc.com> | 2012-11-30 23:24:12 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2012-11-30 23:24:12 +0100 |
commit | 809b96ad8db0ac0c3a1f3a33036efe2ba5ad2e96 (patch) | |
tree | f6769575dd3457f18418e942908cdc0cad92f910 /java/src/IceGridGUI/SessionKeeper.java | |
parent | Fixed GCC release warnings and set QT_HOME to /usr in Make.rules (diff) | |
download | ice-809b96ad8db0ac0c3a1f3a33036efe2ba5ad2e96.tar.bz2 ice-809b96ad8db0ac0c3a1f3a33036efe2ba5ad2e96.tar.xz ice-809b96ad8db0ac0c3a1f3a33036efe2ba5ad2e96.zip |
IceGridGUI fixes (ICE-5074 & ICE-5075)
ICE-5074 - NPE in IceGrid GUI login
ICE-5075 - Saved connection doesn't remember "No X.509" certificate
Diffstat (limited to 'java/src/IceGridGUI/SessionKeeper.java')
-rw-r--r-- | java/src/IceGridGUI/SessionKeeper.java | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/java/src/IceGridGUI/SessionKeeper.java b/java/src/IceGridGUI/SessionKeeper.java index 1eb441356a1..68e7fcdcdd6 100644 --- a/java/src/IceGridGUI/SessionKeeper.java +++ b/java/src/IceGridGUI/SessionKeeper.java @@ -604,7 +604,7 @@ public class SessionKeeper _prefs.putBoolean("storePassword", _storePassword); if(_storePassword) { - _prefs.put("password", new String(getPassword())); + _prefs.put("password", getPassword() != null ? new String(getPassword()) : null); } if(_useX509Certificate) { @@ -618,7 +618,7 @@ public class SessionKeeper _prefs.putBoolean("storeKeyPassword", _storeKeyPassword); if(_storeKeyPassword) { - _prefs.put("keyPassword", new String(getKeyPassword())); + _prefs.put("keyPassword", getKeyPassword() != null ? new String(getKeyPassword()) : null); } _prefs.putBoolean("useX509Certificate", true); } @@ -1041,6 +1041,7 @@ public class SessionKeeper ConnectionWizardDialog(JDialog parent) { super(parent, true); + _x509CertificateDefault = true; initialize("New Connection - IceGrid Admin", parent); _connectNow = true; } @@ -1049,6 +1050,7 @@ public class SessionKeeper { super(parent, true); _conf = inf; + _x509CertificateDefault = false; initialize("Edit Connection - IceGrid Admin", parent); _connectNow = false; _nextButton.requestFocusInWindow(); @@ -1487,6 +1489,8 @@ public class SessionKeeper { public void actionPerformed(ActionEvent e) { + _x509CertificateDefault = false; + _usernamePasswordAuthButton.setSelected(true); validatePanel(); } }); @@ -1496,6 +1500,7 @@ public class SessionKeeper { public void actionPerformed(ActionEvent e) { + _x509CertificateDefault = false; validatePanel(); } }); @@ -1846,7 +1851,7 @@ public class SessionKeeper _cardLayout.show(_cardPanel, WizardStep.DirectUsernamePasswordCredentialsStep.toString()); _wizardSteps.push(WizardStep.DirectUsernamePasswordCredentialsStep); } - if(_conf == null) + if(_x509CertificateDefault) { if(_directDefaultEndpointSSL.isSelected()) { @@ -1873,7 +1878,7 @@ public class SessionKeeper _cardLayout.show(_cardPanel, WizardStep.RoutedUsernamePasswordCredentialsStep.toString()); _wizardSteps.push(WizardStep.RoutedUsernamePasswordCredentialsStep); } - if(_conf == null) + if(_x509CertificateDefault) { if(_routedDefaultEndpointSSL.isSelected()) { @@ -1928,7 +1933,7 @@ public class SessionKeeper JOptionPane.ERROR_MESSAGE); return; } - if(_conf == null) + if(_x509CertificateDefault) { if(hasSecureEndpoints(_directCustomEndpointValue.getText())) { @@ -1983,7 +1988,7 @@ public class SessionKeeper JOptionPane.ERROR_MESSAGE); return; } - if(_conf == null) + if(_x509CertificateDefault) { if(hasSecureEndpoints(_routedCustomEndpointValue.getText())) { @@ -2206,7 +2211,8 @@ public class SessionKeeper if(_x509CertificateYesButton.isSelected()) { inf.setAlias((String)_routedCertificateAliases.getSelectedItem()); - if(_routedCertificatePassword.getPassword() != null && _routedCertificatePassword.getPassword().length > 0) + if(_routedCertificatePassword.getPassword() != null && + _routedCertificatePassword.getPassword().length > 0) { inf.setKeyPassword(_routedCertificatePassword.getPassword()); inf.setStoreKeyPassword(true); @@ -2918,6 +2924,7 @@ public class SessionKeeper java.util.Stack<WizardStep> _wizardSteps = new java.util.Stack<WizardStep>(); ConnectionInfo _conf; + private boolean _x509CertificateDefault; } private boolean hasSecureEndpoints(String str) |