> +         // ignore
> +      } finally {
> +         if (in != null) {
> +            in.reset();
> +            Payload payload = Payloads.newInputStreamPayload(in);
> +            contentMetadataCodec.fromHeaders(payload.getContentMetadata(), 
> originalResponse.getHeaders());
> +            responseBuilder.payload(payload);
> +         }
> +      }
> +      }
> +
> +      return responseBuilder.build();
> +   }
> +
> +   private static boolean hasServerError(final HttpResponse response) {
> +      return Response.Status.fromStatusCode(response.getStatusCode()) == 
> Response.Status.INTERNAL_SERVER_ERROR;

What about just: `return response.getStatusCode() >= 500`? There's no need to 
build other objects here.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/72/files#r22237898

Reply via email to