Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2015-12-02 14:20:06 -0500
committerJoakim Erdfelt2015-12-02 14:20:06 -0500
commit97722aeea8822128a084ff07e889b2aac1991ded (patch)
tree04d44048c7b96dcd86d427b444c91039e9923ce5
parent1e6b94094235aa9a7af543959c3488ea0bbd60d0 (diff)
parentbae11382115bca0ef8bcfcaf03eb95586e085488 (diff)
downloadorg.eclipse.jetty.project-97722aeea8822128a084ff07e889b2aac1991ded.tar.gz
org.eclipse.jetty.project-97722aeea8822128a084ff07e889b2aac1991ded.tar.xz
org.eclipse.jetty.project-97722aeea8822128a084ff07e889b2aac1991ded.zip
Merge branch 'jetty-9.3.x'
-rw-r--r--jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java4
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/DecoratorsLegacyTest.java2
-rw-r--r--jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/DecoratorsTest.java1
3 files changed, 5 insertions, 2 deletions
diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java
index 2a312a423c..89478bdec3 100644
--- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java
+++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java
@@ -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));
diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/DecoratorsLegacyTest.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/DecoratorsLegacyTest.java
index e26ede2624..4163ffe434 100644
--- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/DecoratorsLegacyTest.java
+++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/DecoratorsLegacyTest.java
@@ -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());
}
diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/DecoratorsTest.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/DecoratorsTest.java
index baa511415d..167507335e 100644
--- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/DecoratorsTest.java
+++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/DecoratorsTest.java
@@ -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());
}
};

Back to the top