> +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 static org.jclouds.http.HttpUtils.contains404;
> +import static org.jclouds.util.Throwables2.getFirstThrowableOfType;
> +
> +public class EmptyQueuesFallback implements Fallback<Queues> {
> +
> +   public ListenableFuture<Queues> create(Throwable t) throws Exception {
> +      return immediateFuture(createOrPropagate(t));
> +   }
> +
> +   public Queues createOrPropagate(Throwable t) throws Exception {
> +
> +      return valOnNotFoundOr404(Queues.EMPTY,
> +            checkNotNull(t, "throwable"));

[minor] Does this fit on one line?

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

Reply via email to