Bug 50131 - PersistentValve.invoke - possible NPE at line 186
Summary: PersistentValve.invoke - possible NPE at line 186
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: trunk
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-20 19:59 UTC by Sebb
Modified: 2010-10-28 20:05 UTC (History)
0 users



Attachments
Don't dereference null when generating the log message (1007 bytes, patch)
2010-10-20 19:59 UTC, Sebb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2010-10-20 19:59:07 UTC
Created attachment 26194 [details]
Don't dereference null when generating the log message

PersistentValve.invoke() has the code:

if (session != null && ...){
} else {
    session.isValid() // line 186

It's quite possible that session is null in the log message.
Comment 1 Mark Thomas 2010-10-24 10:16:18 UTC
This was fixed as part of the general clean-up undertaken when getting trunk to build with Checkstyle's unused imports check enabled. The fix will be in 7.0.5 onwards.
Comment 2 Konstantin Kolinko 2010-10-24 18:13:50 UTC
The patch was proposed for 6.0 and 5.5.
Comment 3 Konstantin Kolinko 2010-10-28 19:59:54 UTC
Fixed in 6.0 by r1028554, will be in 6.0.30.
Comment 4 Konstantin Kolinko 2010-10-28 20:05:40 UTC
Fixed in 5.5 by r1028556, will be in 5.5.32.