eclipse-ee4j / eclipse-ee4j/jersey

ClientResponse.close() should not throw a NullPointerException

Open
#1,944 7 comments 0 reactions 0 assignees View on GitHub
Priority: Major Type: Bug
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

Currently closing the connection is not easy.
the easiest solution would be to have a finally block with just response.close().
However, depending on the server response entity may be null in ClientResponse#613
i think close should include a null check here. and just do nothing if it does not have an entity.
#### Affected Versions
[1.17]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.