Bug 51658

Summary: Potential NPE in CoyoteAdapter.log
Product: Tomcat 7 Reporter: Felix Schumacher <felix.schumacher>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: trivial    
Priority: P2    
Version: trunk   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: logAccess on host instead of context

Description Felix Schumacher 2011-08-13 11:10:19 UTC
Created attachment 27384 [details]
logAccess on host instead of context

In CoyoteAdapter.log:501 request.mapping.context is known to be null and request.mapping.host is checked to be not null, but inside that if branch in line 503 request.mapping.context will be used.

I think it should be "((Host) request.mappingData.host).logAccess(..." instead.
Comment 1 Mark Thomas 2011-08-16 08:59:39 UTC
Thanks for the report. This has been fixed in trunk and 7.0.x and will be included in 7.0.21 onwards.