> @@ -106,4 +106,17 @@ public Object createOrPropagate(Throwable t) throws
> Exception {
> throw propagate(t);
> }
> }
> +
> + public static final class FalseOnKeyAlreadyExists implements
> Fallback<Object> {
> + public ListenableFuture<Object> create(Throwable t) throws Exception {
> + return immediateFuture(createOrPropagate(t));
> + }
> +
> + public Object createOrPropagate(Throwable t) throws Exception {
> + if (checkNotNull(t, "throwable") instanceof
> KeyAlreadyExistsException) {
No need for the `checkNotNull` here unless we really want to throw an NPE
instead of propagating `t` here? (null isn't instanceof KAEE).
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/169/files#r6784109