Author: adietish
Date: 2011-10-17 03:11:33 -0400 (Mon, 17 Oct 2011)
New Revision: 35695
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java
Log:
[JBIDE-9920] changed passphrase text field to be a password text field
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java
===================================================================
---
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java 2011-10-17
07:08:01 UTC (rev 35694)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java 2011-10-17
07:11:33 UTC (rev 35695)
@@ -49,6 +49,7 @@
import org.jboss.tools.openshift.express.client.OpenshiftException;
import org.jboss.tools.openshift.express.client.SSHKeyPair;
import org.jboss.tools.openshift.express.internal.ui.OpenshiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.common.StringUtils;
/**
* @author André Dietisheim
@@ -215,7 +216,7 @@
@Override
public IStatus validate(Object value) {
if (!(value instanceof String)
- || isEmpty((String) value)
+ || StringUtils.isEmpty((String) value)
|| !isReadable((String) value)) {
return ValidationStatus.error("You have to provide a valid ssh public
key");
}
@@ -228,7 +229,7 @@
}
private boolean isKeyKnownToSsh(String publicKeyPath) {
- if (isEmpty(publicKeyPath)) {
+ if (StringUtils.isEmpty(publicKeyPath)) {
return false;
}
for (String preferencesKey : SshPrivateKeysPreferences.getKeys()) {
@@ -263,9 +264,4 @@
return file.exists()
&& file.canRead();
}
-
- private boolean isEmpty(String value) {
- return value == null
- || ((String) value).length() == 0;
- }
}
Show replies by date