tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48818] Request.getSession() can return null
Date Wed, 24 Mar 2010 00:24:44 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48818

Mark Thomas <markt@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #4 from Mark Thomas <markt@apache.org> 2010-03-24 00:24:41 UTC ---
The cases in which null will be returned are:
1. no context associated with the request
2. no manager associated with the context
3. no response associated with the request
4. the manager returns null for Manager.createSession()

4. should never happen and will throw an NPE in the Manager if it does
1., 2., & 3. should not be possible unless the request is accessed after it is
recycled which would indicate an application bug (we do see this from time to
time - apps storing references to the request object and using them after
request processing has finished)

In terms of returning null, the spec is silent on how session generation errors
should be handled. If an exception were thrown, you could equally argue that
the spec does not allow for any exceptions to be thrown.

A code review has not identified any code paths that would cause a null to
returned unless some other error has occurred first. Absent an explanation or a
reproducible test case, I am going to assume that the root cause of the NPEs is
an application bug.

The cases where null is returned seem reasonable to me given the lack of
direction provided by the specification.

I am therefore resolving this as WONTFIX.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message