From d1c2345a92c085bfac972f161ae7a803cf373721 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Thu, 8 May 2025 14:05:54 -0700 Subject: [PATCH 1/2] JDK-8356555: Incorrect use of {@link} in BigDecimal --- src/java.base/share/classes/java/math/BigDecimal.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java.base/share/classes/java/math/BigDecimal.java b/src/java.base/share/classes/java/math/BigDecimal.java index c710d67ec526d..e0d6c2f9c0b85 100644 --- a/src/java.base/share/classes/java/math/BigDecimal.java +++ b/src/java.base/share/classes/java/math/BigDecimal.java @@ -105,8 +105,8 @@ * considers members of the same cohort to be equal to each other. In * contrast, the {@link equals equals} method requires both the * numerical value and representation to be the same for equality to - * hold. The results of methods like {@link scale} and {@link - * unscaledValue} will differ for numerically equal values with + * hold. The results of methods like {@link #scale()} and {@link + * #unscaledValue()} will differ for numerically equal values with * different representations. * *

In general the rounding modes and precision setting determine From 212261bd2fb8136e37ecc24d676d307a601469ab Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Fri, 9 May 2025 09:10:04 -0700 Subject: [PATCH 2/2] Respond to review feedback. --- src/java.base/share/classes/java/math/BigDecimal.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java.base/share/classes/java/math/BigDecimal.java b/src/java.base/share/classes/java/math/BigDecimal.java index e0d6c2f9c0b85..dd6253a713273 100644 --- a/src/java.base/share/classes/java/math/BigDecimal.java +++ b/src/java.base/share/classes/java/math/BigDecimal.java @@ -360,10 +360,10 @@ public class BigDecimal extends Number implements Comparable { private final BigInteger intVal; /** - * The scale of this BigDecimal, as returned by {@link #scale}. + * The scale of this BigDecimal, as returned by {@link #scale()}. * * @serial - * @see #scale + * @see #scale() */ private final int scale; // Note: this may have any value, so // calculations must be done in longs