> +   }
> +
> +   @Inject(optional = true)
> +   @Named(Constants.PROPERTY_MAX_RETRIES)
> +   private int retryCountLimit = 5;
> +   @Resource
> +   protected Logger logger = Logger.NULL;
> +
> +   public boolean shouldRetryRequest(HttpCommand command, HttpResponse 
> response) {
> +      if (command.getFailureCount() > retryCountLimit) {
> +         return false;
> +      }
> +      if (response.getStatusCode() == 500) {
> +         byte[] content = 
> HttpUtils.closeClientButKeepContentStream(response);
> +         // Content can be null in the case of HEAD requests
> +         if (content != null) {

Invert this to a `if (content == null) { return false; }` block to lose another 
level of indenting?

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

Reply via email to