Bug 51650 - possible nullpointer exception in RequestUtil.parseParameters
Summary: possible nullpointer exception in RequestUtil.parseParameters
Status: RESOLVED FIXED
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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-11 17:03 UTC by Felix Schumacher
Modified: 2011-08-12 09:11 UTC (History)
0 users



Attachments
set default encoding, if none is given (1.67 KB, patch)
2011-08-11 17:03 UTC, Felix Schumacher
Details | Diff
document that encoding must not be null and remove check (1.74 KB, patch)
2011-08-12 04:50 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-11 17:03:48 UTC
Created attachment 27376 [details]
set default encoding, if none is given

When encoding is null, RequestUtil.parseParameters will throw a NPE at B2CConverter.getCharset.
Comment 1 Mark Thomas 2011-08-11 17:20:33 UTC
Rather than adding NPE protection, the null check in that method can be removed. Tomcat always calls those methods with an encoding.
Comment 2 Felix Schumacher 2011-08-12 04:50:31 UTC
Created attachment 27378 [details]
document that encoding must not be null and remove check
Comment 3 Mark Thomas 2011-08-12 09:11:57 UTC
Thanks for the patch. It has been applied to trunk and 7.0.x and will be included in 7.0.21 onwards.