-
Enhancement
-
Resolution: Fixed
-
P3
-
9
-
b112
BigInteger.valueOf(2) is a common BigInteger value used in binary and cryptography calculation. The BigInteger.TWO is not export, and hence BigInteger.valueOf(2) is used instead. The export BigInteger.TWO can improve a performance and easy the code a little bit.
The following command can be used to find the use of BigInteger.valueOf(2) in JDK repositories.
$ find . -type f | xargs grep "BigInteger.valueOf(2)"
Maybe nice to export BigInteger.TWO in JDK 9.
- /**
- * The BigInteger constant two. (Not exported.)
- */
- private static final BigInteger TWO = valueOf(2);
+ /*
+ * The BigInteger constant two.
+ *
+ * @since 9
+ */
+ public static final BigInteger TWO = valueOf(2);
The following command can be used to find the use of BigInteger.valueOf(2) in JDK repositories.
$ find . -type f | xargs grep "BigInteger.valueOf(2)"
Maybe nice to export BigInteger.TWO in JDK 9.
- /**
- * The BigInteger constant two. (Not exported.)
- */
- private static final BigInteger TWO = valueOf(2);
+ /*
+ * The BigInteger constant two.
+ *
+ * @since 9
+ */
+ public static final BigInteger TWO = valueOf(2);