diff --git a/src/java.base/share/classes/java/text/CompactNumberFormat.java b/src/java.base/share/classes/java/text/CompactNumberFormat.java
index 35464d6ec91..fae11cbdba1 100644
--- a/src/java.base/share/classes/java/text/CompactNumberFormat.java
+++ b/src/java.base/share/classes/java/text/CompactNumberFormat.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2169,14 +2169,10 @@ public final class CompactNumberFormat extends NumberFormat {
}
/**
- * Sets the maximum number of digits allowed in the integer portion of a
- * number.
- * The maximum allowed integer range is 309, if the {@code newValue} > 309,
- * then the maximum integer digits count is set to 309. Negative input
- * values are replaced with 0.
- *
- * @param newValue the maximum number of integer digits to be shown
- * @see #getMaximumIntegerDigits()
+ * {@inheritDoc NumberFormat}
+ *
The maximum allowed integer range is 309, if the {@code newValue} >
+ * 309, then the maximum integer digits count is set to 309.
+ * @param newValue the maximum number of integer digits to be shown.
*/
@Override
public void setMaximumIntegerDigits(int newValue) {
@@ -2194,14 +2190,10 @@ public final class CompactNumberFormat extends NumberFormat {
}
/**
- * Sets the minimum number of digits allowed in the integer portion of a
- * number.
- * The maximum allowed integer range is 309, if the {@code newValue} > 309,
- * then the minimum integer digits count is set to 309. Negative input
- * values are replaced with 0.
- *
- * @param newValue the minimum number of integer digits to be shown
- * @see #getMinimumIntegerDigits()
+ * {@inheritDoc NumberFormat}
+ *
The maximum allowed integer range is 309, if the {@code newValue} >
+ * 309, then the minimum integer digits count is set to 309.
+ * @param newValue the minimum number of integer digits to be shown.
*/
@Override
public void setMinimumIntegerDigits(int newValue) {
@@ -2219,14 +2211,10 @@ public final class CompactNumberFormat extends NumberFormat {
}
/**
- * Sets the minimum number of digits allowed in the fraction portion of a
- * number.
- * The maximum allowed fraction range is 340, if the {@code newValue} > 340,
- * then the minimum fraction digits count is set to 340. Negative input
- * values are replaced with 0.
- *
- * @param newValue the minimum number of fraction digits to be shown
- * @see #getMinimumFractionDigits()
+ * {@inheritDoc NumberFormat}
+ *
The maximum allowed fraction range is 340, if the {@code newValue} >
+ * 340, then the minimum fraction digits count is set to 340.
+ * @param newValue the minimum number of fraction digits to be shown.
*/
@Override
public void setMinimumFractionDigits(int newValue) {
@@ -2245,14 +2233,10 @@ public final class CompactNumberFormat extends NumberFormat {
}
/**
- * Sets the maximum number of digits allowed in the fraction portion of a
- * number.
- * The maximum allowed fraction range is 340, if the {@code newValue} > 340,
- * then the maximum fraction digits count is set to 340. Negative input
- * values are replaced with 0.
- *
- * @param newValue the maximum number of fraction digits to be shown
- * @see #getMaximumFractionDigits()
+ * {@inheritDoc NumberFormat}
+ *
The maximum allowed fraction range is 340, if the {@code newValue} >
+ * 340, then the maximum fraction digits count is set to 340.
+ * @param newValue the maximum number of fraction digits to be shown.
*/
@Override
public void setMaximumFractionDigits(int newValue) {
diff --git a/src/java.base/share/classes/java/text/DecimalFormat.java b/src/java.base/share/classes/java/text/DecimalFormat.java
index ce2ecfb23a2..3aa42ed8601 100644
--- a/src/java.base/share/classes/java/text/DecimalFormat.java
+++ b/src/java.base/share/classes/java/text/DecimalFormat.java
@@ -110,6 +110,10 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* defined by {@link Character#digit Character.digit}, are recognized.
*
*
Integer and Fraction Digit Limits
+ * The integer and fraction digit limits are set by either applying a {@link ##patterns
+ * pattern} or using one of the appropriate {@code DecimalFormat} setter methods,
+ * for example, {@link #setMinimumFractionDigits(int)}. These limits have no impact
+ * on parsing behavior.
* @implSpec
* When formatting a {@code Number} other than {@code BigInteger} and
* {@code BigDecimal}, {@code 309} is used as the upper limit for integer digits,
@@ -3972,9 +3976,9 @@ public class DecimalFormat extends NumberFormat {
}
/**
- * Sets the maximum number of digits allowed in the integer portion of a
- * number. Negative input values are replaced with 0.
- * @see NumberFormat#setMaximumIntegerDigits
+ * {@inheritDoc NumberFormat}
+ * @param newValue the maximum number of integer digits to be shown.
+ * @see #getMaximumIntegerDigits()
* @see ##digit_limits Integer and Fraction Digit Limits
*/
@Override
@@ -3989,9 +3993,9 @@ public class DecimalFormat extends NumberFormat {
}
/**
- * Sets the minimum number of digits allowed in the integer portion of a
- * number. Negative input values are replaced with 0.
- * @see NumberFormat#setMinimumIntegerDigits
+ * {@inheritDoc NumberFormat}
+ * @param newValue the minimum number of integer digits to be shown.
+ * @see #getMinimumIntegerDigits()
* @see ##digit_limits Integer and Fraction Digit Limits
*/
@Override
@@ -4006,9 +4010,9 @@ public class DecimalFormat extends NumberFormat {
}
/**
- * Sets the maximum number of digits allowed in the fraction portion of a
- * number. Negative input values are replaced with 0.
- * @see NumberFormat#setMaximumFractionDigits
+ * {@inheritDoc NumberFormat}
+ * @param newValue the maximum number of fraction digits to be shown.
+ * @see #getMaximumFractionDigits()
* @see ##digit_limits Integer and Fraction Digit Limits
*/
@Override
@@ -4023,9 +4027,9 @@ public class DecimalFormat extends NumberFormat {
}
/**
- * Sets the minimum number of digits allowed in the fraction portion of a
- * number. Negative input values are replaced with 0.
- * @see NumberFormat#setMinimumFractionDigits
+ * {@inheritDoc NumberFormat}
+ * @param newValue the minimum number of fraction digits to be shown.
+ * @see #getMinimumFractionDigits()
* @see ##digit_limits Integer and Fraction Digit Limits
*/
@Override
@@ -4040,11 +4044,11 @@ public class DecimalFormat extends NumberFormat {
}
/**
- * Gets the maximum number of digits allowed in the integer portion of a
- * number. The maximum number of integer digits can be set by either {@link #setMaximumIntegerDigits(int)}
- * or {@link #applyPattern(String)}. See the {@link ##patterns Pattern Section} for
- * comprehensive rules regarding maximum integer digits in patterns.
+ * {@inheritDoc NumberFormat}
+ * Unlike the other digit limits, {@code maximumIntegerDigits} is not
+ * updated by {@code DecimalFormats} created or updated with a string pattern.
* @see #setMaximumIntegerDigits
+ * @see ##patterns Pattern Section
* @see ##digit_limits Integer and Fraction Digit Limits
*/
@Override
@@ -4053,8 +4057,7 @@ public class DecimalFormat extends NumberFormat {
}
/**
- * Gets the minimum number of digits allowed in the integer portion of a
- * number.
+ * {@inheritDoc NumberFormat}
* @see #setMinimumIntegerDigits
* @see ##digit_limits Integer and Fraction Digit Limits
*/
@@ -4064,8 +4067,7 @@ public class DecimalFormat extends NumberFormat {
}
/**
- * Gets the maximum number of digits allowed in the fraction portion of a
- * number.
+ * {@inheritDoc NumberFormat}
* @see #setMaximumFractionDigits
* @see ##digit_limits Integer and Fraction Digit Limits
*/
@@ -4075,8 +4077,7 @@ public class DecimalFormat extends NumberFormat {
}
/**
- * Gets the minimum number of digits allowed in the fraction portion of a
- * number.
+ * {@inheritDoc NumberFormat}
* @see #setMinimumFractionDigits
* @see ##digit_limits Integer and Fraction Digit Limits
*/
diff --git a/src/java.base/share/classes/java/text/NumberFormat.java b/src/java.base/share/classes/java/text/NumberFormat.java
index 710c4e771ff..bd4ec53656a 100644
--- a/src/java.base/share/classes/java/text/NumberFormat.java
+++ b/src/java.base/share/classes/java/text/NumberFormat.java
@@ -129,9 +129,9 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
*
* - {@link #setParseIntegerOnly(boolean)}; when {@code true}, will only return the
* integer portion of the number parsed from the String.
- *
- {@link #setMinimumFractionDigits(int)}; Use to adjust the expected digits when
- * formatting. Use any of the other minimum/maximum or fraction/integer setter methods
- * in the same manner.
+ *
- {@link #setMinimumFractionDigits(int)}; Use to adjust the expected digits
+ * when formatting. Use any of the other minimum/maximum or fraction/integer
+ * setter methods in the same manner. These methods have no impact on parsing behavior.
*
- {@link #setGroupingUsed(boolean)}; when {@code true}, formatted numbers will be displayed
* with grouping separators. Additionally, when {@code false}, parsing will not expect
* grouping separators in the parsed String.
@@ -918,7 +918,7 @@ public abstract class NumberFormat extends Format {
/**
* Returns the maximum number of digits allowed in the integer portion of a
- * number.
+ * number during formatting.
*
* @return the maximum number of digits
* @see #setMaximumIntegerDigits
@@ -929,14 +929,15 @@ public abstract class NumberFormat extends Format {
/**
* Sets the maximum number of digits allowed in the integer portion of a
- * number. maximumIntegerDigits must be ≥ minimumIntegerDigits. If the
- * new value for maximumIntegerDigits is less than the current value
- * of minimumIntegerDigits, then minimumIntegerDigits will also be set to
- * the new value.
+ * number during formatting. {@code maximumIntegerDigits} must be ≥
+ * {@code minimumIntegerDigits}. If the new value for {@code
+ * maximumIntegerDigits} is less than the current value of
+ * {@code minimumIntegerDigits}, then {@code minimumIntegerDigits} will
+ * also be set to the new value. Negative input values are replaced with 0.
*
- * @param newValue the maximum number of integer digits to be shown; if
- * less than zero, then zero is used. The concrete subclass may enforce an
- * upper limit to this value appropriate to the numeric type being formatted.
+ * @param newValue the maximum number of integer digits to be shown. The
+ * concrete subclass may enforce an upper limit to this value appropriate to
+ * the numeric type being formatted.
* @see #getMaximumIntegerDigits
*/
public void setMaximumIntegerDigits(int newValue) {
@@ -948,7 +949,7 @@ public abstract class NumberFormat extends Format {
/**
* Returns the minimum number of digits allowed in the integer portion of a
- * number.
+ * number during formatting.
*
* @return the minimum number of digits
* @see #setMinimumIntegerDigits
@@ -959,14 +960,15 @@ public abstract class NumberFormat extends Format {
/**
* Sets the minimum number of digits allowed in the integer portion of a
- * number. minimumIntegerDigits must be ≤ maximumIntegerDigits. If the
- * new value for minimumIntegerDigits exceeds the current value
- * of maximumIntegerDigits, then maximumIntegerDigits will also be set to
- * the new value
+ * number during formatting. {@code minimumIntegerDigits} must be ≤
+ * {@code maximumIntegerDigits}. If the new value for {@code minimumIntegerDigits}
+ * exceeds the current value of {@code maximumIntegerDigits}, then {@code
+ * maximumIntegerDigits} will also be set to the new value. Negative input
+ * values are replaced with 0.
*
- * @param newValue the minimum number of integer digits to be shown; if
- * less than zero, then zero is used. The concrete subclass may enforce an
- * upper limit to this value appropriate to the numeric type being formatted.
+ * @param newValue the minimum number of integer digits to be shown. The
+ * concrete subclass may enforce an upper limit to this value appropriate to
+ * the numeric type being formatted.
* @see #getMinimumIntegerDigits
*/
public void setMinimumIntegerDigits(int newValue) {
@@ -978,7 +980,7 @@ public abstract class NumberFormat extends Format {
/**
* Returns the maximum number of digits allowed in the fraction portion of a
- * number.
+ * number during formatting.
*
* @return the maximum number of digits.
* @see #setMaximumFractionDigits
@@ -989,14 +991,15 @@ public abstract class NumberFormat extends Format {
/**
* Sets the maximum number of digits allowed in the fraction portion of a
- * number. maximumFractionDigits must be ≥ minimumFractionDigits. If the
- * new value for maximumFractionDigits is less than the current value
- * of minimumFractionDigits, then minimumFractionDigits will also be set to
- * the new value.
+ * number during formatting. {@code maximumFractionDigits} must be ≥
+ * {@code minimumFractionDigits}. If the new value for {@code maximumFractionDigits}
+ * is less than the current value of {@code minimumFractionDigits}, then
+ * {@code minimumFractionDigits} will also be set to the new value. Negative
+ * input values are replaced with 0.
*
- * @param newValue the maximum number of fraction digits to be shown; if
- * less than zero, then zero is used. The concrete subclass may enforce an
- * upper limit to this value appropriate to the numeric type being formatted.
+ * @param newValue the maximum number of fraction digits to be shown. The
+ * concrete subclass may enforce an upper limit to this value appropriate to
+ * the numeric type being formatted.
* @see #getMaximumFractionDigits
*/
public void setMaximumFractionDigits(int newValue) {
@@ -1008,7 +1011,7 @@ public abstract class NumberFormat extends Format {
/**
* Returns the minimum number of digits allowed in the fraction portion of a
- * number.
+ * number during formatting.
*
* @return the minimum number of digits
* @see #setMinimumFractionDigits
@@ -1019,14 +1022,15 @@ public abstract class NumberFormat extends Format {
/**
* Sets the minimum number of digits allowed in the fraction portion of a
- * number. minimumFractionDigits must be ≤ maximumFractionDigits. If the
- * new value for minimumFractionDigits exceeds the current value
- * of maximumFractionDigits, then maximumFractionDigits will also be set to
- * the new value
+ * number during formatting. {@code minimumFractionDigits} must be ≤
+ * {@code maximumFractionDigits}. If the new value for {@code
+ * minimumFractionDigits} exceeds the current value of {@code
+ * maximumFractionDigits}, then {@code maximumFractionDigits} will also be
+ * set to the new value. Negative input values are replaced with 0.
*
- * @param newValue the minimum number of fraction digits to be shown; if
- * less than zero, then zero is used. The concrete subclass may enforce an
- * upper limit to this value appropriate to the numeric type being formatted.
+ * @param newValue the minimum number of fraction digits to be shown. The
+ * concrete subclass may enforce an upper limit to this value appropriate to
+ * the numeric type being formatted.
* @see #getMinimumFractionDigits
*/
public void setMinimumFractionDigits(int newValue) {