Skip to content

Commit 4e5d41c

Browse files
committed
- check response status code for HTTP204 messages
1 parent 887b7b1 commit 4e5d41c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

NetLicensingClient/src/main/java/com/labs64/netlicensing/provider/RestProviderJersey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private <RES> RES readEntity(final Response response, final Class<RES> responseT
148148
buffered = response.bufferEntity();
149149
return response.readEntity(responseType);
150150
} catch (final ProcessingException ex) {
151-
if (ex.getCause() instanceof NoContentException) {
151+
if (response.getStatus() == Response.Status.NO_CONTENT.getStatusCode() || ex.getCause() instanceof NoContentException) {
152152
return null;
153153
} else {
154154
if ((response.getStatusInfo().getFamily() == Response.Status.Family.CLIENT_ERROR)

0 commit comments

Comments
 (0)