From 18285fc136e1a892ab54a705c1fa82e91325b06a Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Wed, 28 May 2025 14:23:23 +0000 Subject: [PATCH] 8356553: Incorrect uses of {@link} in AbstractQueuedLongSynchronizer and AbstractQueuedSynchronizer Reviewed-by: alanb --- .../locks/AbstractQueuedLongSynchronizer.java | 20 +++++++------- .../locks/AbstractQueuedSynchronizer.java | 27 ++++++++++--------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java b/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java index bdb81f3cb60..c660af6a0ba 100644 --- a/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java +++ b/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java @@ -1303,8 +1303,8 @@ public abstract class AbstractQueuedLongSynchronizer *
  • Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  • Block until signalled. - *
  • Reacquire by invoking specialized version of - * {@link #acquire} with saved state as argument. + *
  • Reacquire by invoking underlying version of + * {@link #acquire(long)} with saved state as argument. * */ public final void awaitUninterruptibly() { @@ -1346,8 +1346,8 @@ public abstract class AbstractQueuedLongSynchronizer *
  • Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  • Block until signalled or interrupted. - *
  • Reacquire by invoking specialized version of - * {@link #acquire} with saved state as argument. + *
  • Reacquire by invoking underlying version of + * {@link #acquire(long)} with saved state as argument. *
  • If interrupted while blocked in step 4, throw InterruptedException. * */ @@ -1398,8 +1398,8 @@ public abstract class AbstractQueuedLongSynchronizer *
  • Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  • Block until signalled, interrupted, or timed out. - *
  • Reacquire by invoking specialized version of - * {@link #acquire} with saved state as argument. + *
  • Reacquire by invoking underlying version of + * {@link #acquire(long)} with saved state as argument. *
  • If interrupted while blocked in step 4, throw InterruptedException. * */ @@ -1442,8 +1442,8 @@ public abstract class AbstractQueuedLongSynchronizer *
  • Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  • Block until signalled, interrupted, or timed out. - *
  • Reacquire by invoking specialized version of - * {@link #acquire} with saved state as argument. + *
  • Reacquire by invoking underlying version of + * {@link #acquire(long)} with saved state as argument. *
  • If interrupted while blocked in step 4, throw InterruptedException. *
  • If timed out while blocked in step 4, return false, else true. * @@ -1485,8 +1485,8 @@ public abstract class AbstractQueuedLongSynchronizer *
  • Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  • Block until signalled, interrupted, or timed out. - *
  • Reacquire by invoking specialized version of - * {@link #acquire} with saved state as argument. + *
  • Reacquire by invoking underlying version of + * {@link #acquire(long)} with saved state as argument. *
  • If interrupted while blocked in step 4, throw InterruptedException. *
  • If timed out while blocked in step 4, return false, else true. * diff --git a/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java b/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java index 5d899ffb0c5..0ff216c80a0 100644 --- a/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java +++ b/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java @@ -86,9 +86,10 @@ import jdk.internal.misc.Unsafe; * #isHeldExclusively} reports whether synchronization is exclusively * held with respect to the current thread, method {@link #release} * invoked with the current {@link #getState} value fully releases - * this object, and {@link #acquire}, given this saved state value, - * eventually restores this object to its previous acquired state. No - * {@code AbstractQueuedSynchronizer} method otherwise creates such a + * this object, and the underlying version of {@link #acquire(int)}, + * given this saved state value, eventually restores this object to + * its previous acquired state. + * No {@code AbstractQueuedSynchronizer} method otherwise creates such a * condition, so if this constraint cannot be met, do not use it. The * behavior of {@link ConditionObject} depends of course on the * semantics of its synchronizer implementation. @@ -1682,8 +1683,8 @@ public abstract class AbstractQueuedSynchronizer *
  • Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  • Block until signalled. - *
  • Reacquire by invoking specialized version of - * {@link #acquire} with saved state as argument. + *
  • Reacquire by invoking underlying version of + * {@link #acquire(int)} with saved state as argument. * */ public final void awaitUninterruptibly() { @@ -1725,8 +1726,8 @@ public abstract class AbstractQueuedSynchronizer *
  • Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  • Block until signalled or interrupted. - *
  • Reacquire by invoking specialized version of - * {@link #acquire} with saved state as argument. + *
  • Reacquire by invoking underlying version of + * {@link #acquire(int)} with saved state as argument. *
  • If interrupted while blocked in step 4, throw InterruptedException. * */ @@ -1777,8 +1778,8 @@ public abstract class AbstractQueuedSynchronizer *
  • Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  • Block until signalled, interrupted, or timed out. - *
  • Reacquire by invoking specialized version of - * {@link #acquire} with saved state as argument. + *
  • Reacquire by invoking underlying version of + * {@link #acquire(int)} with saved state as argument. *
  • If interrupted while blocked in step 4, throw InterruptedException. * */ @@ -1821,8 +1822,8 @@ public abstract class AbstractQueuedSynchronizer *
  • Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  • Block until signalled, interrupted, or timed out. - *
  • Reacquire by invoking specialized version of - * {@link #acquire} with saved state as argument. + *
  • Reacquire by invoking underlying version of + * {@link #acquire(int)} with saved state as argument. *
  • If interrupted while blocked in step 4, throw InterruptedException. *
  • If timed out while blocked in step 4, return false, else true. * @@ -1864,8 +1865,8 @@ public abstract class AbstractQueuedSynchronizer *
  • Invoke {@link #release} with saved state as argument, * throwing IllegalMonitorStateException if it fails. *
  • Block until signalled, interrupted, or timed out. - *
  • Reacquire by invoking specialized version of - * {@link #acquire} with saved state as argument. + *
  • Reacquire by invoking underlying version of + * {@link #acquire(int)} with saved state as argument. *
  • If interrupted while blocked in step 4, throw InterruptedException. *
  • If timed out while blocked in step 4, return false, else true. *