From 3853b98a9419dcfae2a8c026dabc85d44947584e Mon Sep 17 00:00:00 2001 From: cpovirk Date: Wed, 20 Nov 2024 07:07:19 -0800 Subject: [PATCH] Stop warning that Caffeine requires Java 8. So does Guava :) Also, restore balance to the force after cl/696692285 by using `@link` instead of `@code` (or eliminating `#` while keeping `@code`) in various places. RELNOTES=n/a PiperOrigin-RevId: 698378812 --- .../com/google/common/collect/PeekingIteratorTest.java | 2 +- .../src/com/google/common/cache/CacheBuilder.java | 10 +++++----- .../com/google/common/collect/PeekingIteratorTest.java | 2 +- guava/src/com/google/common/cache/CacheBuilder.java | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/android/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java b/android/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java index ad7a4b9a34a7..ad260ef65186 100644 --- a/android/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java +++ b/android/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java @@ -51,7 +51,7 @@ public class PeekingIteratorTest extends TestCase { * *

This IteratorTester makes copies of the master so that it can later verify that {@link * PeekingIterator#remove()} removes the same elements as the reference's iterator {@code - * #remove()}. + * remove()}. */ private static class PeekingIteratorTester extends IteratorTester { private Iterable master; diff --git a/android/guava/src/com/google/common/cache/CacheBuilder.java b/android/guava/src/com/google/common/cache/CacheBuilder.java index 06e6034658a4..2e4dd16ca527 100644 --- a/android/guava/src/com/google/common/cache/CacheBuilder.java +++ b/android/guava/src/com/google/common/cache/CacheBuilder.java @@ -51,9 +51,9 @@ * *

The successor to Guava's caching API is Caffeine. Its API is designed to make it a - * nearly drop-in replacement. It requires Java 8+, and is not available for Android or GWT/J2CL, - * and may have different (usually - * better) behavior when multiple threads attempt concurrent mutations. Its equivalent to {@code + * nearly drop-in replacement. Note that it is not available for Android or GWT/J2CL and that it may + * have different (usually better) + * behavior when multiple threads attempt concurrent mutations. Its equivalent to {@code * CacheBuilder} is its {@code * Caffeine} class. Caffeine offers better performance, more features (including asynchronous @@ -182,10 +182,10 @@ * explanation. * * @param the most general key type this builder will be able to create caches for. This is - * normally {@code Object} unless it is constrained by using a method like {@code + * normally {@code Object} unless it is constrained by using a method like {@link * #removalListener}. Cache keys may not be null. * @param the most general value type this builder will be able to create caches for. This is - * normally {@code Object} unless it is constrained by using a method like {@code + * normally {@code Object} unless it is constrained by using a method like {@link * #removalListener}. Cache values may not be null. * @author Charles Fry * @author Kevin Bourrillion diff --git a/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java b/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java index ad7a4b9a34a7..ad260ef65186 100644 --- a/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java +++ b/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java @@ -51,7 +51,7 @@ public class PeekingIteratorTest extends TestCase { * *

This IteratorTester makes copies of the master so that it can later verify that {@link * PeekingIterator#remove()} removes the same elements as the reference's iterator {@code - * #remove()}. + * remove()}. */ private static class PeekingIteratorTester extends IteratorTester { private Iterable master; diff --git a/guava/src/com/google/common/cache/CacheBuilder.java b/guava/src/com/google/common/cache/CacheBuilder.java index dd535077b030..3f026a46be65 100644 --- a/guava/src/com/google/common/cache/CacheBuilder.java +++ b/guava/src/com/google/common/cache/CacheBuilder.java @@ -51,9 +51,9 @@ * *

The successor to Guava's caching API is Caffeine. Its API is designed to make it a - * nearly drop-in replacement. It requires Java 8+, and is not available for Android or GWT/J2CL, - * and may have different (usually - * better) behavior when multiple threads attempt concurrent mutations. Its equivalent to {@code + * nearly drop-in replacement. Note that it is not available for Android or GWT/J2CL and that it may + * have different (usually better) + * behavior when multiple threads attempt concurrent mutations. Its equivalent to {@code * CacheBuilder} is its {@code * Caffeine} class. Caffeine offers better performance, more features (including asynchronous @@ -182,10 +182,10 @@ * explanation. * * @param the most general key type this builder will be able to create caches for. This is - * normally {@code Object} unless it is constrained by using a method like {@code + * normally {@code Object} unless it is constrained by using a method like {@link * #removalListener}. Cache keys may not be null. * @param the most general value type this builder will be able to create caches for. This is - * normally {@code Object} unless it is constrained by using a method like {@code + * normally {@code Object} unless it is constrained by using a method like {@link * #removalListener}. Cache values may not be null. * @author Charles Fry * @author Kevin Bourrillion