Bug 51658 - Potential NPE in CoyoteAdapter.log
Summary: Potential NPE in CoyoteAdapter.log
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: trunk
Hardware: All All
: P2 trivial (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2011-08-13 11:10 UTC by Felix Schumacher
Modified: 2011-08-16 08:59 UTC (History)
0 users

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.