aboutsummaryrefslogtreecommitdiff
path: root/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java
diff options
context:
space:
mode:
Diffstat (limited to 'guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java')
-rw-r--r--guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java b/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java
index dc8511d94..79ec94a1e 100644
--- a/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java
+++ b/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java
@@ -15,6 +15,7 @@
package com.google.common.util.concurrent;
import com.google.common.annotations.GwtIncompatible;
+import com.google.common.annotations.J2ktIncompatible;
import com.google.common.collect.ForwardingQueue;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.util.Collection;
@@ -36,7 +37,7 @@ import javax.annotation.CheckForNull;
* @param <E> the type of elements held in this collection
* @since 4.0
*/
-@CanIgnoreReturnValue // TODO(cpovirk): Consider being more strict.
+@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
public abstract class ForwardingBlockingQueue<E> extends ForwardingQueue<E>
@@ -48,21 +49,25 @@ public abstract class ForwardingBlockingQueue<E> extends ForwardingQueue<E>
@Override
protected abstract BlockingQueue<E> delegate();
+ @CanIgnoreReturnValue
@Override
public int drainTo(Collection<? super E> c, int maxElements) {
return delegate().drainTo(c, maxElements);
}
+ @CanIgnoreReturnValue
@Override
public int drainTo(Collection<? super E> c) {
return delegate().drainTo(c);
}
+ @CanIgnoreReturnValue // TODO(kak): consider removing this
@Override
public boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException {
return delegate().offer(e, timeout, unit);
}
+ @CanIgnoreReturnValue // TODO(kak): consider removing this
@Override
@CheckForNull
public E poll(long timeout, TimeUnit unit) throws InterruptedException {
@@ -79,6 +84,7 @@ public abstract class ForwardingBlockingQueue<E> extends ForwardingQueue<E>
return delegate().remainingCapacity();
}
+ @CanIgnoreReturnValue // TODO(kak): consider removing this
@Override
public E take() throws InterruptedException {
return delegate().take();