aboutsummaryrefslogtreecommitdiff
path: root/android/guava/src/com/google/common/cache/Cache.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/guava/src/com/google/common/cache/Cache.java')
-rw-r--r--android/guava/src/com/google/common/cache/Cache.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/android/guava/src/com/google/common/cache/Cache.java b/android/guava/src/com/google/common/cache/Cache.java
index 1234bb6a3..985f66582 100644
--- a/android/guava/src/com/google/common/cache/Cache.java
+++ b/android/guava/src/com/google/common/cache/Cache.java
@@ -18,7 +18,7 @@ import com.google.common.annotations.GwtCompatible;
import com.google.common.collect.ImmutableMap;
import com.google.common.util.concurrent.ExecutionError;
import com.google.common.util.concurrent.UncheckedExecutionException;
-import com.google.errorprone.annotations.CheckReturnValue;
+import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.errorprone.annotations.CompatibleWith;
import com.google.errorprone.annotations.DoNotMock;
import java.util.Map;
@@ -52,6 +52,7 @@ public interface Cache<K, V> {
* @since 11.0
*/
@CheckForNull
+ @CanIgnoreReturnValue // TODO(b/27479612): consider removing this?
V getIfPresent(@CompatibleWith("K") Object key);
/**
@@ -100,6 +101,7 @@ public interface Cache<K, V> {
* @throws ExecutionError if an error was thrown while loading the value
* @since 11.0
*/
+ @CanIgnoreReturnValue // TODO(b/27479612): consider removing this
V get(K key, Callable<? extends V> loader) throws ExecutionException;
/**
@@ -150,7 +152,6 @@ public interface Cache<K, V> {
void invalidateAll();
/** Returns the approximate number of entries in this cache. */
- @CheckReturnValue
long size();
/**
@@ -164,7 +165,6 @@ public interface Cache<K, V> {
* all values is returned.
*
*/
- @CheckReturnValue
CacheStats stats();
/**
@@ -180,7 +180,6 @@ public interface Cache<K, V> {
* {@code ConcurrentMap} documentation. They will not function correctly and it is impossible for
* Guava to fix them until Guava is ready to <i>require</i> Java 8 for all users.
*/
- @CheckReturnValue
ConcurrentMap<K, V> asMap();
/**