Skip to content

Commit

Permalink
Some adapations to make tests fit to jdk11u
Browse files Browse the repository at this point in the history
  • Loading branch information
RealCLanger committed Oct 25, 2021
1 parent 83973c5 commit 1dfc3b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/jdk/sun/net/www/protocol/http/RedirectOnPost.java
Expand Up @@ -23,6 +23,7 @@

/**
* @test
* @library /test/lib
* @library /lib/testlibrary/
* @modules jdk.httpserver
* @build jdk.testlibrary.SimpleSSLContext
Expand Down
6 changes: 6 additions & 0 deletions test/lib/jdk/test/lib/net/URIBuilder.java
Expand Up @@ -61,6 +61,12 @@ public URIBuilder host(String host) {
return this;
}

public URIBuilder host(InetAddress address) {
String hostaddr = address.isAnyLocalAddress()
? "localhost" : address.getHostAddress();
return host(hostaddr);
}

public URIBuilder loopback() {
return host(InetAddress.getLoopbackAddress().getHostAddress());
}
Expand Down

0 comments on commit 1dfc3b8

Please sign in to comment.