Merge branch 'jetty-9.3.x'
This commit is contained in:
commit
97722aeea8
|
@ -387,7 +387,7 @@ public class ServletContextHandlerTest
|
|||
String expected = String.format("Attribute[%s] = %s", DecoratedObjectFactory.ATTR, DecoratedObjectFactory.class.getName());
|
||||
assertThat("Has context attribute", response, containsString(expected));
|
||||
|
||||
assertThat("Decorators size", response, containsString("Decorators.size = [1]"));
|
||||
assertThat("Decorators size", response, containsString("Decorators.size = [2]"));
|
||||
|
||||
expected = String.format("decorator[] = %s", DummyLegacyDecorator.class.getName());
|
||||
assertThat("Specific Legacy Decorator", response, containsString(expected));
|
||||
|
@ -414,7 +414,7 @@ public class ServletContextHandlerTest
|
|||
String expected = String.format("Attribute[%s] = %s", DecoratedObjectFactory.ATTR, DecoratedObjectFactory.class.getName());
|
||||
assertThat("Has context attribute", response, containsString(expected));
|
||||
|
||||
assertThat("Decorators size", response, containsString("Decorators.size = [1]"));
|
||||
assertThat("Decorators size", response, containsString("Decorators.size = [2]"));
|
||||
|
||||
expected = String.format("decorator[] = %s", DummyUtilDecorator.class.getName());
|
||||
assertThat("Specific Legacy Decorator", response, containsString(expected));
|
||||
|
|
|
@ -109,6 +109,7 @@ public class DecoratorsLegacyTest
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static class DummyLegacyDecorator implements org.eclipse.jetty.servlet.ServletContextHandler.Decorator
|
||||
{
|
||||
@Override
|
||||
|
@ -136,6 +137,7 @@ public class DecoratorsLegacyTest
|
|||
@Override
|
||||
protected void configureServletContextHandler(ServletContextHandler context)
|
||||
{
|
||||
context.getObjectFactory().clear();
|
||||
// Add decorator in the legacy way
|
||||
context.addDecorator(new DummyLegacyDecorator());
|
||||
}
|
||||
|
|
|
@ -136,6 +136,7 @@ public class DecoratorsTest
|
|||
protected void configureServletContextHandler(ServletContextHandler context)
|
||||
{
|
||||
// Add decorator in the new util way
|
||||
context.getObjectFactory().clear();
|
||||
context.getObjectFactory().addDecorator(new DummyUtilDecorator());
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue