Summary
Add the constant java.math.BigDecimal.TWO
.
Problem
There is no constant java.math.BigDecimal.TWO
which is inconsistent with java.math.BigInteger.TWO
.
Solution
Add the constant java.math.BigDecimal.TWO
.
Specification
--- a/src/java.base/share/classes/java/math/BigDecimal.java
+++ b/src/java.base/share/classes/java/math/BigDecimal.java
@@ -416,6 +416,14 @@ public class BigDecimal extends Number implements Comparabl
e<BigDecimal> {
public static final BigDecimal ONE =
ZERO_THROUGH_TEN[1];
+ /**
+ * The value 2, with a scale of 0.
+ *
+ * @since 19
+ */
+ public static final BigDecimal TWO =
+ ZERO_THROUGH_TEN[2];
+
/**
* The value 10, with a scale of 0.
*
- csr of
-
JDK-8213045 Add BigDecimal.TWO
-
- Resolved
-