JCLOUDS-40 unasync Fallback.

This commit is contained in:
Adrian Cole 2014-10-06 16:21:08 -07:00
parent 6db35d20bd
commit 0c9b49baf5
1 changed files with 1 additions and 6 deletions

View File

@ -18,17 +18,12 @@ package org.jclouds.googlecloudstorage.fallback;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Throwables.propagate;
import static com.google.common.util.concurrent.Futures.immediateFuture;
import org.jclouds.Fallback;
import com.google.common.util.concurrent.ListenableFuture;
public final class GCSFallbacks {
public static final class NullOnBucketAlreadyExists 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 IllegalStateException) {
return null;