Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The method gets a n HttpSession, but does not check for null before it uses it.
HttpSession httpSession = getHttpSession(webRequest);
// register an unbinding listener for cleaning up
String applicationKey = application.getApplicationKey();
httpSession.setAttribute("Wicket:SessionUnbindingListener-" + applicationKey,
... ...
The method getHttpSession is allowed to return null and most other places in the code check for null before using the session.
Stack trace:
Oct 19, 2010 9:39:30 PM org.apache.wicket.RequestCycle onExceptionLoop
SEVERE: unexpected exception when handling another exception: null
java.lang.NullPointerException
at org.apache.wicket.protocol.http.AbstractHttpSessionStore.bind(AbstractHttpSessionStore.java:144)
at org.apache.wicket.Session.bind(Session.java:422)
at org.apache.wicket.Page.onBeforeRender(Page.java:1537)
at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
at org.apache.wicket.Component.beforeRender(Component.java:1105)
at org.apache.wicket.Component.prepareForRender(Component.java:2292)
at org.apache.wicket.Page.prepareForRender(Page.java:1521)
at org.apache.wicket.Component.prepareForRender(Component.java:2329)
at org.apache.wicket.Page.renderPage(Page.java:892)