You can view the issue detail at the following URL:
<http://nagoya.apache.org/scarab/issues/id/TTWS11>

Type :        Defect
Issue Id :    TTWS11
Reported by: David Vandegrift
             [EMAIL PROTECTED] - ([EMAIL PROTECTED])

Details:

Platform: PC
Operating system: windows NT
Summary: DefaultCookieParser throws NullPointerException
Description: setRunData() in DefaultCookieParser.java will throw a 
NullPointerException if the HttpRequest does not yet have any cookies associated with 
it.
According to the Servlet Spec, HttpServletRequest.getCookies() retuns null if no 
cookies are defined.
Cookie[] cookies = data.getRequest().getCookies();

The existing code immediately accesses cookies.length. But since cookies is null an 
NPE is throw.
A patch is attached that adds a variable 'cookiesLength' and sets it's value by 
checking for null first.

Also, the patch removes a the redundant line:
cookiePath = new DynamicURI(data);


--
To unsubscribe, e-mail:   <mailto:turbine-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-dev-help@;jakarta.apache.org>

Reply via email to