Skip to content

Commit 3386500

Browse files
Fix CheckReturnValue error: assign compute() result to unused variable
Error Prone requires compute() return value to be used. Using Object unused to satisfy the check (var not available with source 1.8).
1 parent 217afb9 commit 3386500

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guava-tests/test/com/google/common/cache/LocalCacheTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ public void testComputeRemovalCause_collected() {
11041104

11051105
// Now call compute() with a function that returns null
11061106
// Since the value was collected, the removal cause should be COLLECTED, not EXPLICIT
1107-
map.compute(key, (k, v) -> {
1107+
Object unused = map.compute(key, (k, v) -> {
11081108
// The value should be null since it was collected
11091109
assertThat(v).isNull();
11101110
return null;

0 commit comments

Comments
 (0)