Issue Details (XML | Word | Printable)

Key: JERSEY-1577
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Michal Gajdos
Reporter: jan.supol
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
jersey

WebTarget throws IAE instead of NPE

Created: 14/Nov/12 02:49 PM   Updated: 20/Feb/13 08:58 AM   Resolved: 20/Feb/13 08:58 AM
Component/s: core
Affects Version/s: 2.0-m09
Fix Version/s: 2.0-m13, 2.0

Time Tracking:
Original Estimate: 3 hours
Original Estimate - 3 hours
Remaining Estimate: 0 minutes
Remaining Estimate - 0 minutes
Time Spent: 2 hours
Time Spent - 2 hours Time Not Required

Issue Links:
Dependency
 

Tags:
Participants: jan.supol and Michal Gajdos


 Description  « Hide

WebTarget#queryParam javadoc says:

Throws:
java.lang.NullPointerException - if the parameter name is null or if there are multiple values present and any of those values is null.

WebTarget#resolveTemplatesFromEncoded javadoc says:

Throws:
java.lang.NullPointerException - if the parameter name is null or if there are multiple values present and any of those values is null.

WebTarget#resolveTemplates javadoc says:

Throws:
java.lang.NullPointerException - if the name-value map or any of the names or values in the map is null.

But

target.queryParam(null, "abc");
HashMap<String, Object> map = new HashMap<String, Object>();
map.put(null, "xyz");
target.path("{path}").resolveTemplatesFromEncoded(map);
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("path", null);
target.path("{path}").resolveTemplatesFromEncoded(map);
Map<String, Object> map = new HashMap<String, Object>();
map.put(null, "xyz");
target.path("{path}").resolveTemplates(map);
Map<String, Object> map = new HashMap<String, Object>();
map.put("path", null);
target.path("{path}").resolveTemplates(map);
Map<String, Object> map = new HashMap<String, Object>();
map.put(null, "xyz");
target.path("{path}").resolveTemplates(map, false);
Map<String, Object> map = new HashMap<String, Object>();
map.put("path", null);
target.path("{path}").resolveTemplates(map, true);

each throws IAE.



There are no comments yet on this issue.