Skip to content

Commit 82ce359

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Restore some @link tags and associated imports that were removed in cl/305727790.
(Also, newly link to `Executor` from `MoreExecutors`.) RELNOTES=n/a PiperOrigin-RevId: 816800946
1 parent 96584e9 commit 82ce359

File tree

6 files changed

+26
-24
lines changed

6 files changed

+26
-24
lines changed

android/guava/src/com/google/common/base/Stopwatch.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*
3939
* <p>In contrast, <i>wall time</i> is a reading of "now" as given by a method like
4040
* {@link System#currentTimeMillis()}, best represented as an {@link java.time.Instant}. Such values
41-
* <i>can</i> be subtracted to obtain a {@code Duration} (such as by {@code Duration.between}), but
41+
* <i>can</i> be subtracted to obtain a {@link Duration} (such as by {@link Duration#between}), but
4242
* doing so does <i>not</i> give a reliable measurement of elapsed time, because wall time readings
4343
* are inherently approximate, routinely affected by periodic clock corrections. Because this class
4444
* (by default) uses {@link System#nanoTime}, it is unaffected by these changes.
@@ -209,7 +209,7 @@ private long elapsedNanos() {
209209
*
210210
* <p>It is generally not a good idea to use an ambiguous, unitless {@code long} to represent
211211
* elapsed time. Therefore, we recommend using {@link #elapsed()} instead, which returns a
212-
* strongly-typed {@code Duration} instance.
212+
* strongly-typed {@link Duration} instance.
213213
*
214214
* @since 14.0 (since 10.0 as {@code elapsedTime()})
215215
*/

android/guava/src/com/google/common/cache/CacheBuilder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@
9393
* <li>least-recently-used eviction when a maximum size is exceeded (note that the cache is
9494
* divided into segments, each of which does LRU internally)
9595
* <li>time-based expiration of entries, measured since last access or last write
96-
* <li>keys automatically wrapped in {@code WeakReference}
97-
* <li>values automatically wrapped in {@code WeakReference} or {@code SoftReference}
96+
* <li>keys automatically wrapped in {@linkplain WeakReference weak} references
97+
* <li>values automatically wrapped in {@linkplain WeakReference weak} or {@linkplain
98+
* SoftReference soft} references
9899
* <li>notification of evicted (or otherwise removed) entries
99100
* <li>accumulation of cache access statistics
100101
* </ul>

android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@
5252
import java.util.concurrent.ScheduledThreadPoolExecutor;
5353
import java.util.concurrent.ThreadFactory;
5454
import java.util.concurrent.ThreadPoolExecutor;
55+
import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy;
5556
import java.util.concurrent.TimeUnit;
5657
import java.util.concurrent.TimeoutException;
5758
import org.jspecify.annotations.Nullable;
5859

5960
/**
60-
* Factory and utility methods for {@link java.util.concurrent.Executor}, {@link ExecutorService},
61-
* and {@link java.util.concurrent.ThreadFactory}.
61+
* Factory and utility methods for {@link Executor}, {@link ExecutorService}, and {@link
62+
* ThreadFactory}.
6263
*
6364
* @author Eric Fellheimer
6465
* @author Kyle Littlefield
@@ -303,11 +304,10 @@ private static void useDaemonThreadFactory(ThreadPoolExecutor executor) {
303304

304305
/**
305306
* Creates an executor service that runs each task in the thread that invokes {@code
306-
* execute/submit}, as in {@code ThreadPoolExecutor.CallerRunsPolicy}. This applies both to
307-
* individually submitted tasks and to collections of tasks submitted via {@code invokeAll} or
308-
* {@code invokeAny}. In the latter case, tasks will run serially on the calling thread. Tasks are
309-
* run to completion before a {@code Future} is returned to the caller (unless the executor has
310-
* been shutdown).
307+
* execute/submit}, as in {@link CallerRunsPolicy} This applies both to individually submitted
308+
* tasks and to collections of tasks submitted via {@code invokeAll} or {@code invokeAny}. In the
309+
* latter case, tasks will run serially on the calling thread. Tasks are run to completion before
310+
* a {@code Future} is returned to the caller (unless the executor has been shutdown).
311311
*
312312
* <p>Although all tasks are immediately executed in the thread that submitted the task, this
313313
* {@code ExecutorService} imposes a small locking overhead on each task submission in order to
@@ -334,7 +334,7 @@ public static ListeningExecutorService newDirectExecutorService() {
334334

335335
/**
336336
* Returns an {@link Executor} that runs each task in the thread that invokes {@link
337-
* Executor#execute execute}, as in {@code ThreadPoolExecutor.CallerRunsPolicy}.
337+
* Executor#execute execute}, as in {@link CallerRunsPolicy}.
338338
*
339339
* <p>This executor is appropriate for tasks that are lightweight and not deeply chained.
340340
* Inappropriate {@code directExecutor} usage can cause problems, and these problems can be

guava/src/com/google/common/base/Stopwatch.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*
3939
* <p>In contrast, <i>wall time</i> is a reading of "now" as given by a method like
4040
* {@link System#currentTimeMillis()}, best represented as an {@link java.time.Instant}. Such values
41-
* <i>can</i> be subtracted to obtain a {@code Duration} (such as by {@code Duration.between}), but
41+
* <i>can</i> be subtracted to obtain a {@link Duration} (such as by {@link Duration#between}), but
4242
* doing so does <i>not</i> give a reliable measurement of elapsed time, because wall time readings
4343
* are inherently approximate, routinely affected by periodic clock corrections. Because this class
4444
* (by default) uses {@link System#nanoTime}, it is unaffected by these changes.
@@ -209,7 +209,7 @@ private long elapsedNanos() {
209209
*
210210
* <p>It is generally not a good idea to use an ambiguous, unitless {@code long} to represent
211211
* elapsed time. Therefore, we recommend using {@link #elapsed()} instead, which returns a
212-
* strongly-typed {@code Duration} instance.
212+
* strongly-typed {@link Duration} instance.
213213
*
214214
* @since 14.0 (since 10.0 as {@code elapsedTime()})
215215
*/

guava/src/com/google/common/cache/CacheBuilder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@
9393
* <li>least-recently-used eviction when a maximum size is exceeded (note that the cache is
9494
* divided into segments, each of which does LRU internally)
9595
* <li>time-based expiration of entries, measured since last access or last write
96-
* <li>keys automatically wrapped in {@code WeakReference}
97-
* <li>values automatically wrapped in {@code WeakReference} or {@code SoftReference}
96+
* <li>keys automatically wrapped in {@linkplain WeakReference weak} references
97+
* <li>values automatically wrapped in {@linkplain WeakReference weak} or {@linkplain
98+
* SoftReference soft} references
9899
* <li>notification of evicted (or otherwise removed) entries
99100
* <li>accumulation of cache access statistics
100101
* </ul>

guava/src/com/google/common/util/concurrent/MoreExecutors.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@
5252
import java.util.concurrent.ScheduledThreadPoolExecutor;
5353
import java.util.concurrent.ThreadFactory;
5454
import java.util.concurrent.ThreadPoolExecutor;
55+
import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy;
5556
import java.util.concurrent.TimeUnit;
5657
import java.util.concurrent.TimeoutException;
5758
import org.jspecify.annotations.Nullable;
5859

5960
/**
60-
* Factory and utility methods for {@link java.util.concurrent.Executor}, {@link ExecutorService},
61-
* and {@link java.util.concurrent.ThreadFactory}.
61+
* Factory and utility methods for {@link Executor}, {@link ExecutorService}, and {@link
62+
* ThreadFactory}.
6263
*
6364
* @author Eric Fellheimer
6465
* @author Kyle Littlefield
@@ -300,11 +301,10 @@ private static void useDaemonThreadFactory(ThreadPoolExecutor executor) {
300301

301302
/**
302303
* Creates an executor service that runs each task in the thread that invokes {@code
303-
* execute/submit}, as in {@code ThreadPoolExecutor.CallerRunsPolicy}. This applies both to
304-
* individually submitted tasks and to collections of tasks submitted via {@code invokeAll} or
305-
* {@code invokeAny}. In the latter case, tasks will run serially on the calling thread. Tasks are
306-
* run to completion before a {@code Future} is returned to the caller (unless the executor has
307-
* been shutdown).
304+
* execute/submit}, as in {@link CallerRunsPolicy} This applies both to individually submitted
305+
* tasks and to collections of tasks submitted via {@code invokeAll} or {@code invokeAny}. In the
306+
* latter case, tasks will run serially on the calling thread. Tasks are run to completion before
307+
* a {@code Future} is returned to the caller (unless the executor has been shutdown).
308308
*
309309
* <p>Although all tasks are immediately executed in the thread that submitted the task, this
310310
* {@code ExecutorService} imposes a small locking overhead on each task submission in order to
@@ -331,7 +331,7 @@ public static ListeningExecutorService newDirectExecutorService() {
331331

332332
/**
333333
* Returns an {@link Executor} that runs each task in the thread that invokes {@link
334-
* Executor#execute execute}, as in {@code ThreadPoolExecutor.CallerRunsPolicy}.
334+
* Executor#execute execute}, as in {@link CallerRunsPolicy}.
335335
*
336336
* <p>This executor is appropriate for tasks that are lightweight and not deeply chained.
337337
* Inappropriate {@code directExecutor} usage can cause problems, and these problems can be

0 commit comments

Comments
 (0)