bug 42773 - jdt.launching.SocketUtil.findFeePort
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMDebugger.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMDebugger.java
index 9e61564..7dd3b5d 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMDebugger.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMDebugger.java
@@ -121,7 +121,7 @@
subMonitor.beginTask(LaunchingMessages.getString("StandardVMDebugger.Launching_VM..._1"), 4); //$NON-NLS-1$
subMonitor.subTask(LaunchingMessages.getString("StandardVMDebugger.Finding_free_socket..._2")); //$NON-NLS-1$
- int port= SocketUtil.findFeePort();
+ int port= SocketUtil.findFreePort();
if (port == -1) {
abort(LaunchingMessages.getString("StandardVMDebugger.Could_not_find_a_free_socket_for_the_debugger_1"), null, IJavaLaunchConfigurationConstants.ERR_NO_SOCKET_AVAILABLE); //$NON-NLS-1$
}
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/SocketUtil.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/SocketUtil.java
index 9fb5259..32730b9 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/SocketUtil.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/SocketUtil.java
@@ -66,8 +66,19 @@
*
* @return a free port number on localhost, or -1 if unable to find a free port
* @since 3.0
+ * @deprecated use #findFreePort() instead (there was a spelling mistake in this method)
*/
public static int findFeePort() {
+ return findFreePort();
+ }
+
+ /**
+ * Returns a free port number on localhost, or -1 if unable to find a free port.
+ *
+ * @return a free port number on localhost, or -1 if unable to find a free port
+ * @since 3.0
+ */
+ public static int findFreePort() {
ServerSocket socket= null;
try {
socket= new ServerSocket(0);
@@ -82,5 +93,5 @@
}
}
return -1;
- }
+ }
}