tck tests are done after ServletContext has already been initialized so we need to test this first to get some tck test passing... (#4514)

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
This commit is contained in:
Olivier Lamy 2020-01-28 20:33:16 +10:00 committed by GitHub
parent cdcef4f328
commit d74676e46c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1299,15 +1299,15 @@ public class ServletContextHandler extends ContextHandler
@Override
public boolean setInitParameter(String name, String value)
{
//since servlet spec 4.0
Objects.requireNonNull(name);
if (!isStarting())
throw new IllegalStateException();
if (!_enabled)
throw new UnsupportedOperationException();
//since servlet spec 4.0
Objects.requireNonNull(name);
return super.setInitParameter(name, value);
}