Skip to content

Commit b984b9e

Browse files
committed
Deleting unused utility methods
1 parent f3dfb7f commit b984b9e

2 files changed

Lines changed: 0 additions & 35 deletions

File tree

java/client/src/org/openqa/selenium/net/PortProber.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff 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

java/client/src/org/openqa/selenium/net/Urls.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,6 @@
2929
public 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
*

0 commit comments

Comments
 (0)