mauriciorodrigues / memcached-session-manager

Automatically exported from code.google.com/p/memcached-session-manager
0 stars 0 forks source link

NPE in SessionTrackerValve using log level DEBUG #89

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Method SessionTrackerValve.logDebugRequestSessionCookie() throws an NPE for 
requests without a session id. I guess this is due to request.getCookies() 
returning null.

You might want to change it from

for( final javax.servlet.http.Cookie cookie : request.getCookies() ) {
...

to something like

javax.servlet.http.Cookie[] cookies = request.getCookies();
if (cookies != null) {
    for( final javax.servlet.http.Cookie cookie : request.getCookies() ) {
...

Regards,

Rainer

Original issue reported on code.google.com by rainer.j...@kippdata.de on 16 Mar 2011 at 3:55

GoogleCodeExporter commented 8 years ago
Forgot to mention: Using latest code form TC7 branch. I guess the same report 
applies to the main branch.

Original comment by rainer.j...@kippdata.de on 16 Mar 2011 at 4:02

GoogleCodeExporter commented 8 years ago
Thanx for reporting this, fixed in master and tomcat7.

Original comment by martin.grotzke on 16 Mar 2011 at 5:35