[jbosstools-commits] JBoss Tools SVN: r35696 - in trunk: common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/ssh and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Oct 17 03:16:45 EDT 2011


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);
 		}
 	}
 



More information about the jbosstools-commits mailing list