Author: adietish
Date: 2011-10-17 03:16:45 -0400 (Mon, 17 Oct 2011)
New Revision: 35696
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/ssh/SshPrivateKeysPreferences.java
Log:
[JBIDE-9793] corrected method name and javadoc
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:11:33 UTC (rev 35695)
+++
trunk/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java 2011-10-17
07:16:45 UTC (rev 35696)
@@ -234,7 +234,7 @@
}
for (String preferencesKey : SshPrivateKeysPreferences.getKeys()) {
try {
- File privateKey = SshPrivateKeysPreferences.getPrivateKey(preferencesKey);
+ File privateKey = SshPrivateKeysPreferences.getKeyFile(preferencesKey);
if (privateKey == null
|| !isReadable(privateKey)) {
continue;
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/ssh/SshPrivateKeysPreferences.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/ssh/SshPrivateKeysPreferences.java 2011-10-17
07:11:33 UTC (rev 35695)
+++
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/ssh/SshPrivateKeysPreferences.java 2011-10-17
07:16:45 UTC (rev 35696)
@@ -102,23 +102,23 @@
}
/**
- * Returns the private key for the given entry from the ssh preferences.
- * This methods prepends the ssh directory to the path if it's a relative
- * one. There's no guarantee that the file returned really exists.
+ * Returns the key file for the given (absolute or relative) key path.
+ * This methods prepends the ssh directory to the path if the given it's a
+ * relative one. There's no guarantee that the file returned really exists.
*
- * @param privateKeysPreferencesEntry
+ * @param keyName
* @return
* @throws FileNotFoundException
*/
- public static File getPrivateKey(String privateKeysPreferencesEntry) throws
FileNotFoundException {
- if (isEmpty(privateKeysPreferencesEntry)) {
+ public static File getKeyFile(String keyName) throws FileNotFoundException {
+ if (isEmpty(keyName)) {
return null;
}
- if (privateKeysPreferencesEntry.startsWith(File.separator)) {
- return new File(privateKeysPreferencesEntry);
+ if (keyName.startsWith(File.separator)) {
+ return new File(keyName);
} else {
- return new File(getSshKeyDirectory(), privateKeysPreferencesEntry);
+ return new File(getSshKeyDirectory(), keyName);
}
}