File tree Expand file tree Collapse file tree
java/client/src/org/openqa/selenium/net Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,19 +68,6 @@ public static int findFreePort() {
6868 throw new RuntimeException ("Unable to find a free port" );
6969 }
7070
71- public static Callable <Integer > freeLocalPort (final int port ) {
72- return new Callable <Integer >() {
73-
74- public Integer call ()
75- throws Exception {
76- if (checkPortIsFree (port ) != -1 ) {
77- return port ;
78- }
79- return null ;
80- }
81- };
82- }
83-
8471 /**
8572 * Returns a port that is within a probable free range. <p/> Based on the ports in
8673 * http://en.wikipedia.org/wiki/Ephemeral_ports, this method stays away from all well-known
Original file line number Diff line number Diff line change 2929public class Urls {
3030 private static Logger log = Logger .getLogger (Urls .class .getName ());
3131
32- /**
33- * Strips the specified URL so it only includes a protocol, hostname and port
34- *
35- * @param url URL
36- * @return string of just protocol, host and port
37- */
38- public static String toProtocolHostAndPort (String url ) {
39- try {
40- URL u = new URL (url );
41- String path = u .getPath ();
42- if (path != null && !"" .equals (path ) && !path .endsWith ("/" )) {
43- log .warning ("It looks like your baseUrl (" +
44- url
45- +
46- ") is pointing to a file, not a directory (it doesn't end with a /). We're going to have to strip off the last part of the pathname." );
47- }
48- return u .getProtocol () + "://" + u .getAuthority ();
49- } catch (MalformedURLException e ) {
50- throw new RuntimeException (e );
51- }
52- }
53-
5432 /**
5533 * Encodes the text as an URL using UTF-8.
5634 *
You can’t perform that action at this time.
0 commit comments