RFR: 8269692: sun.net.httpserver.ServerImpl::createContext should throw IAE
Julia Boes
jboes at openjdk.java.net
Fri Jul 2 12:13:18 UTC 2021
On Fri, 2 Jul 2021 11:56:04 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?
-------------
PR: https://git.openjdk.java.net/jdk/pull/4665
More information about the net-dev
mailing list