Oh, got it. In that case, the fix should be enforcing a 0 value is never used. 
I'd change this to validate the value with a `checkArgument`, and fail if it is 
0 (and add the corresponding test).

There are other mechanisms to disable the `BackoffLimitedRetryHandler`. Apis 
can just override the 
[HttpApiModule#bindRetryHandlers](https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/rest/config/HttpApiModule.java#L73)
 method as follows:
```java
bind(HttpErrorHandler.class).annotatedWith(ServerError.class).toInstance(HttpRetryHandler.NEVER_RETRY);
```
Or just use it by default and let users to provide a custom module when 
creating the context with that same binding, if they want to disable it. No 
need to say this same mechanism can be used to inject a custom implementation 
of the retry handler.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/644#issuecomment-69992672

Reply via email to