diff --git a/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/MapMaker.java b/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/MapMaker.java index b2fd7ae78d64..a0d535ca8ff2 100644 --- a/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/MapMaker.java +++ b/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/MapMaker.java @@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkArgument; +import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; @@ -31,6 +32,7 @@ public final class MapMaker { public MapMaker() {} + @CanIgnoreReturnValue public MapMaker initialCapacity(int initialCapacity) { if (initialCapacity < 0) { throw new IllegalArgumentException(); @@ -39,6 +41,7 @@ public MapMaker initialCapacity(int initialCapacity) { return this; } + @CanIgnoreReturnValue public MapMaker concurrencyLevel(int concurrencyLevel) { checkArgument( concurrencyLevel >= 1, "concurrency level (%s) must be at least 1", concurrencyLevel); diff --git a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java index ae7287acc653..c293045958de 100644 --- a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java +++ b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java @@ -51,11 +51,13 @@ public abstract class AbstractFuture extends InternalFutureFailureAccess interface Trusted extends ListenableFuture {} abstract static class TrustedFuture extends AbstractFuture implements Trusted { + @CanIgnoreReturnValue @Override public final V get() throws InterruptedException, ExecutionException { return super.get(); } + @CanIgnoreReturnValue @Override public final V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { @@ -132,12 +134,14 @@ public boolean isDone() { /* * ForwardingFluentFuture needs to override those methods, so they are not final. */ + @CanIgnoreReturnValue @Override public V get() throws InterruptedException, ExecutionException { state.maybeThrowOnGet(throwable); return value; } + @CanIgnoreReturnValue @Override public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {