Skip to content

Commit

Permalink
Merge pull request #5861 from eclipse/jetty-10.0.x-getMappings
Browse files Browse the repository at this point in the history
Fix bad refactor of WebSocket getMappings method.
  • Loading branch information
lachlan-roberts authored Jan 12, 2021
2 parents 4081c68 + 6e6f83c commit 7aae180
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ public class WebSocketMappings implements Dumpable, LifeCycle.Listener
private static final Logger LOG = LoggerFactory.getLogger(WebSocketMappings.class);
public static final String WEBSOCKET_MAPPING_ATTRIBUTE = WebSocketMappings.class.getName();

public static WebSocketMappings getWebSocketNegotiator(ServletContext servletContext)
public static WebSocketMappings getMappings(ServletContext servletContext)
{
return (WebSocketMappings)servletContext.getAttribute(WEBSOCKET_MAPPING_ATTRIBUTE);
}

public static WebSocketMappings ensureMappings(ServletContext servletContext)
{
WebSocketMappings mapping = getWebSocketNegotiator(servletContext);
WebSocketMappings mapping = getMappings(servletContext);
if (mapping == null)
{
mapping = new WebSocketMappings(WebSocketServerComponents.getWebSocketComponents(servletContext));
Expand Down

0 comments on commit 7aae180

Please sign in to comment.