RFR: 8269692: sun.net.httpserver.ServerImpl::createContext should throw IAE
Michael McMahon
michaelm at openjdk.java.net
Fri Jul 2 18:56:52 UTC 2021
On Fri, 2 Jul 2021 11:58:46 GMT, Julia Boes <jboes at openjdk.org> wrote:
>> `com.sun.net.httpserver.HttpServer::createContext` specifies `IllegalArgumentException` to be thrown if a context already exists for the path provided. The implementation class`sun.net.httpserver.ServerImpl` does not comply with this, which is fixed by this change.
>>
>> Testing: Tier 1-3 all clear.
>
> src/jdk.httpserver/share/classes/sun/net/httpserver/ContextList.java line 32:
>
>> 30: class ContextList {
>> 31:
>> 32: final static int MAX_CONTEXTS = 50;
>
> @Michael-Mc-Mahon `MAX_CONTEXTS` is not used anywhere, can it be removed?
It can.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4665
More information about the net-dev
mailing list