--- old/src/java.base/share/classes/java/math/BigDecimal.java Wed Mar 23 03:21:13 2016 +++ new/src/java.base/share/classes/java/math/BigDecimal.java Wed Mar 23 03:21:12 2016 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2016, 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 @@ -286,7 +286,7 @@ private static final BigDecimal ZERO_THROUGH_TEN[] = { new BigDecimal(BigInteger.ZERO, 0, 0, 1), new BigDecimal(BigInteger.ONE, 1, 0, 1), - new BigDecimal(BigInteger.valueOf(2), 2, 0, 1), + new BigDecimal(BigInteger.TWO, 2, 0, 1), new BigDecimal(BigInteger.valueOf(3), 3, 0, 1), new BigDecimal(BigInteger.valueOf(4), 4, 0, 1), new BigDecimal(BigInteger.valueOf(5), 5, 0, 1), @@ -936,7 +936,7 @@ rb = BigInteger.valueOf(5).pow(-exponent).multiply(compactVal); scl = -exponent; } else { // (exponent > 0) - rb = BigInteger.valueOf(2).pow(exponent).multiply(compactVal); + rb = BigInteger.TWO.pow(exponent).multiply(compactVal); } compactVal = compactValFor(rb); } --- old/src/java.base/share/classes/java/math/BigInteger.java Wed Mar 23 03:21:13 2016 +++ new/src/java.base/share/classes/java/math/BigInteger.java Wed Mar 23 03:21:13 2016 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2016, 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 @@ -1266,9 +1266,11 @@ public static final BigInteger ONE = valueOf(1); /** - * The BigInteger constant two. (Not exported.) + * The BigInteger constant two. + * + * @since 9 */ - private static final BigInteger TWO = valueOf(2); + public static final BigInteger TWO = valueOf(2); /** * The BigInteger constant -1. (Not exported.) --- old/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java Wed Mar 23 03:21:14 2016 +++ new/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java Wed Mar 23 03:21:14 2016 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2016, 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 @@ -620,7 +620,7 @@ } private static void checkFirstComponent(BigInteger first) throws IOException { if (first.signum() == -1 || - first.compareTo(BigInteger.valueOf(2)) == 1) { + first.compareTo(BigInteger.TWO) == 1) { throw new IOException("ObjectIdentifier() -- " + "First oid component is invalid "); }