Bug 51658 - Potential NPE in CoyoteAdapter.log
Potential NPE in CoyoteAdapter.log
Status: RESOLVED FIXED
Product: Tomcat 7
Classification: Unclassified
Component: Catalina
trunk
All All
: P2 trivial (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-08-13 11:10 UTC by Felix Schumacher
Modified: 2011-08-16 08:59 UTC (History)
0 users



Attachments
logAccess on host instead of context (735 bytes, patch)
2011-08-13 11:10 UTC, Felix Schumacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.