eclipse-ee4j / eclipse-ee4j/jersey
ClientResponse.hasEntity() should not throw a NullPointerException
Open
Component: core
Priority: Major
Type: Bug
wontfix
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
Similar to #1944 should not throw a NullPointerException"), the hasEntity method throws a null pointer exception when entity is null (like for a 500 response).
When you have filters which look at possible JSON entities, it would be great to not get a null pointer.
The workaround is to check for getEntityInputStream() != null first, which is kind of awkward.
#### Affected Versions
[1.17]
Contributor guide
Assessment
This issue has not been assessed yet.