From c43452859d7211f0d6537d71bd0df89412d4ff6f Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Thu, 23 Sep 2021 12:48:49 +0000 Subject: [PATCH] 8273546: DecimalFormat documentation contains literal HTML character references Reviewed-by: joehw, bpb, iris, lancea --- .../share/classes/java/math/BigInteger.java | 10 +++++----- .../classes/java/text/CompactNumberFormat.java | 4 ++-- .../share/classes/java/text/DecimalFormat.java | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/java.base/share/classes/java/math/BigInteger.java b/src/java.base/share/classes/java/math/BigInteger.java index df06b440276..34f1953d003 100644 --- a/src/java.base/share/classes/java/math/BigInteger.java +++ b/src/java.base/share/classes/java/math/BigInteger.java @@ -941,7 +941,7 @@ public class BigInteger extends Number implements Comparable { * @param certainty a measure of the uncertainty that the caller is * willing to tolerate: if the call returns {@code true} * the probability that this BigInteger is prime exceeds - * {@code (1 - 1/2certainty)}. The execution time of + * (1 - 1/2certainty). The execution time of * this method is proportional to the value of this parameter. * @return {@code true} if this BigInteger is probably prime, * {@code false} if it's definitely composite. @@ -2066,20 +2066,20 @@ public class BigInteger extends Number implements Comparable { // Squaring /** - * Returns a BigInteger whose value is {@code (this2)}. + * Returns a BigInteger whose value is (this2). * - * @return {@code this2} + * @return this2 */ private BigInteger square() { return square(false); } /** - * Returns a BigInteger whose value is {@code (this2)}. If + * Returns a BigInteger whose value is (this2). If * the invocation is recursive certain overflow checks are skipped. * * @param isRecursion whether this is a recursive invocation - * @return {@code this2} + * @return this2 */ private BigInteger square(boolean isRecursion) { if (signum == 0) { diff --git a/src/java.base/share/classes/java/text/CompactNumberFormat.java b/src/java.base/share/classes/java/text/CompactNumberFormat.java index 37a4218fa68..cb94ecb8090 100644 --- a/src/java.base/share/classes/java/text/CompactNumberFormat.java +++ b/src/java.base/share/classes/java/text/CompactNumberFormat.java @@ -169,10 +169,10 @@ import java.util.stream.Collectors; * NegativePattern: * Prefixoptional MinimumInteger Suffixoptional * Prefix: - * Any Unicode characters except \uFFFE, \uFFFF, and + * Any Unicode characters except {@code U+FFFE}, {@code U+FFFF}, and * special characters. * Suffix: - * Any Unicode characters except \uFFFE, \uFFFF, and + * Any Unicode characters except {@code U+FFFE}, {@code U+FFFF}, and * special characters. * MinimumInteger: * 0 diff --git a/src/java.base/share/classes/java/text/DecimalFormat.java b/src/java.base/share/classes/java/text/DecimalFormat.java index 29855bcabd1..ec6d1b84d48 100644 --- a/src/java.base/share/classes/java/text/DecimalFormat.java +++ b/src/java.base/share/classes/java/text/DecimalFormat.java @@ -96,9 +96,9 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * NegativePattern: * Prefixopt Number Suffixopt * Prefix: - * any Unicode characters except \uFFFE, \uFFFF, and special characters + * any Unicode characters except {@code U+FFFE}, {@code U+FFFF}, and special characters * Suffix: - * any Unicode characters except \uFFFE, \uFFFF, and special characters + * any Unicode characters except {@code U+FFFE}, {@code U+FFFF}, and special characters * Number: * Integer Exponentopt * Integer . Fraction Exponentopt @@ -221,12 +221,12 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * Yes * Multiply by 100 and show as percentage * - * {@code \u2030} + * {@code U+2030} * Prefix or suffix * Yes * Multiply by 1000 and show as per mille value * - * {@code ¤} ({@code \u00A4}) + * ¤ ({@code U+00A4}) * Prefix or suffix * No * Currency sign, replaced by currency symbol. If @@ -309,12 +309,12 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; *

Special Values

* *

{@code NaN} is formatted as a string, which typically has a single character - * {@code \uFFFD}. This string is determined by the + * {@code U+FFFD}. This string is determined by the * {@code DecimalFormatSymbols} object. This is the only value for which * the prefixes and suffixes are not used. * *

Infinity is formatted as a string, which typically has a single character - * {@code \u221E}, with the positive or negative prefixes and suffixes + * {@code U+221E}, with the positive or negative prefixes and suffixes * applied. The infinity string is determined by the * {@code DecimalFormatSymbols} object. * @@ -2735,7 +2735,7 @@ public class DecimalFormat extends NumberFormat { * For a percent format, set the multiplier to 100 and the suffixes to * have '%' (for Arabic, use the Arabic percent sign). * For a per mille format, set the multiplier to 1000 and the suffixes to - * have '\u2030'. + * have '{@code U+2030}'. * *

Example: with multiplier 100, 1.23 is formatted as "123", and * "123" is parsed into 1.23.