Bug 50131

Summary: PersistentValve.invoke - possible NPE at line 186
Product: Tomcat 7 Reporter: Sebb <sebb>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: trunk   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: Don't dereference null when generating the log message

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.