mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
include leading slash in path when parsing URLs in URLStreamHandler
This matches the behavior of OpenJDK's version.
This commit is contained in:
parent
999e90c332
commit
750e5f903c
@ -40,7 +40,7 @@ public abstract class URLStreamHandler {
|
||||
host = s.substring(0, colon);
|
||||
port = Integer.parseInt(s.substring(colon + 1), slash);
|
||||
}
|
||||
s = s.substring(slash + 1);
|
||||
s = s.substring(slash);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ import java.net.URL;
|
||||
|
||||
public class UrlTest {
|
||||
private static String query="var1=val1&var2=val2";
|
||||
private static String path="testpath";
|
||||
private static String path="/testpath";
|
||||
private static String domain="file://www.readytalk.com";
|
||||
private static String file=path + "?" + query;
|
||||
private static URL url;
|
||||
@ -15,7 +15,6 @@ public class UrlTest {
|
||||
private static void setupURL() throws MalformedURLException {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append(domain);
|
||||
builder.append("/");
|
||||
builder.append(file);
|
||||
url = new URL(builder.toString());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user