RFR: JDK-8212035 : merge jdk.test.lib.util.SimpleHttpServer with jaxp.library.SimpleHttpServer [v2]

Mahendra Chhipa github.com+34924738+mahendrachhipa at openjdk.java.net
Fri Dec 11 21:06:00 UTC 2020


On Tue, 8 Dec 2020 18:01:20 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Mahendra Chhipa has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Implemented the review comments.
>
> test/lib/jdk/test/lib/net/SimpleHttpServer.java line 83:
> 
>> 81:         //let the server use wild card address
>> 82:         inetAddress = null;
>> 83:     }
> 
> Ideally, all constructors should all delegate to a single constructor that would do all the assignments. Maybe investigate a constructor that takes an InetSocketAddress (that would contain both InetAddress and port)

Now Constructor takes InetSocketAddress as parameter, so now no need of multiple constructors. Thanks for the advice.

> test/lib/jdk/test/lib/net/SimpleHttpServer.java line 63:
> 
>> 61:         httpServer = HttpServer.create();
>> 62:         //let the server use wild card address
>> 63:         inetAddress = null;
> 
> can this constructor simply call `this(null, context, docRoot)`

Now Constructor takes InetSocketAddress as parameter, so now no need of multiple constructors. Thanks for the advice.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1632


More information about the net-dev mailing list