Anna Weber created WICKET-7173:
----------------------------------
Summary: JavaxWebSocketConfigurator: Avoid NPE by adding back null
check for httpSession
Key: WICKET-7173
URL: https://issues.apache.org/jira/browse/WICKET-7173
Project: Wicket
Issue Type: Bug
Components: wicket-native-websocket
Affects Versions: 10.7.0
Reporter: Anna Weber
Assignee: Martin Tzvetanov Grigorov
Due to changes made via WICKET-7162, we get another NPE when {{httpSession}} is
null:
{code:java}
SEVERE [...] org.apache.catalina.core.StandardWrapperValve.invoke
Servlet.service() for servlet [default] in context with path [/contextpath]
threw exception [java.lang.NullPointerException] with root cause
java.lang.NullPointerException
at
java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at
java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
at
org.apache.wicket.protocol.ws.javax.WicketServerEndpointConfig$JavaxWebSocketConfigurator.modifyHandshake(WicketServerEndpointConfig.java:146)
at
org.apache.tomcat.websocket.server.UpgradeUtil.doUpgrade(UpgradeUtil.java:210)
at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:78)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:109)
at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:293){code}
This is fixed by adding back the {{null}} check for {{{}httpSession{}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)