Fix incorrect result for a server response of 204 39/5739/1
authormark.j.leonard <mark.j.leonard@gmail.com>
Tue, 11 Jul 2017 11:02:13 +0000 (12:02 +0100)
committermark.j.leonard <mark.j.leonard@gmail.com>
Tue, 11 Jul 2017 14:24:58 +0000 (15:24 +0100)
commitda669cac0eb4e1832082ffb91cf24f998c114dee
treed6de32c35276dc2b3d46814e63e5ade64b15aba2
parentcf2f6ef5fadb27bab1e65cb25ff9d36acad4a68d
Fix incorrect result for a server response of 204

The Rest Client will not always call the method getEntity() on a
com.sun.jersey.api.client.ClientResponse object, which is documented
to throw a UniformInterfaceException if the HTTP server response status
is 204 (No Content).
This fix prevents the Rest Client handling the thrown exception by
returning a 500 response to the caller, which would wrongly indicate
an Internal Server Error.

Change-Id: I7b78d2b43213e330593bbea559025f790db6264f
Issue-ID: AAI-48
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
src/main/java/org/openecomp/restclient/client/RestClient.java
src/test/java/org/openecomp/restclient/client/RestfulClientTest.java