From 7ed6998a9c63417ac42cff0396fe4f40d7316068 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Thu, 15 Oct 2020 16:36:04 +1100 Subject: [PATCH] changes from review Signed-off-by: Lachlan Roberts --- .../config/JavaxWebSocketServletContainerInitializer.java | 2 +- .../config/JettyWebSocketServletContainerInitializer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jetty-websocket/websocket-javax-server/src/main/java/org/eclipse/jetty/websocket/javax/server/config/JavaxWebSocketServletContainerInitializer.java b/jetty-websocket/websocket-javax-server/src/main/java/org/eclipse/jetty/websocket/javax/server/config/JavaxWebSocketServletContainerInitializer.java index 2b5d3d644b5..576fd96ad28 100644 --- a/jetty-websocket/websocket-javax-server/src/main/java/org/eclipse/jetty/websocket/javax/server/config/JavaxWebSocketServletContainerInitializer.java +++ b/jetty-websocket/websocket-javax-server/src/main/java/org/eclipse/jetty/websocket/javax/server/config/JavaxWebSocketServletContainerInitializer.java @@ -99,7 +99,7 @@ public class JavaxWebSocketServletContainerInitializer implements ServletContain */ public static void configure(ServletContextHandler context, Configurator configurator) { - if (context.isStarted()) + if (!context.isStopped()) throw new IllegalStateException("configure should be called before starting"); // In this embedded-jetty usage, allow ServletContext.addListener() to diff --git a/jetty-websocket/websocket-jetty-server/src/main/java/org/eclipse/jetty/websocket/server/config/JettyWebSocketServletContainerInitializer.java b/jetty-websocket/websocket-jetty-server/src/main/java/org/eclipse/jetty/websocket/server/config/JettyWebSocketServletContainerInitializer.java index be3f63ec51c..a8d19f58035 100644 --- a/jetty-websocket/websocket-jetty-server/src/main/java/org/eclipse/jetty/websocket/server/config/JettyWebSocketServletContainerInitializer.java +++ b/jetty-websocket/websocket-jetty-server/src/main/java/org/eclipse/jetty/websocket/server/config/JettyWebSocketServletContainerInitializer.java @@ -53,7 +53,7 @@ public class JettyWebSocketServletContainerInitializer implements ServletContain */ public static void configure(ServletContextHandler context, Configurator configurator) { - if (context.isStarted()) + if (!context.isStopped()) throw new IllegalStateException("configure should be called before starting"); context.addEventListener(