# HG changeset patch # User darcy # Date 1315004768 25200 # Node ID 7903cf45f96f63d2d0c512e76aab93f03b9ed40e # Parent df8a25e78db38ee86f7436287205fb521f128776 6989067: BigInteger's array copiers should be converted to System.arraycopy() Reviewed-by: mduigou, forax diff -r df8a25e78db3 -r 7903cf45f96f jdk/src/share/classes/java/math/BigInteger.java --- a/jdk/src/share/classes/java/math/BigInteger.java Fri Sep 02 10:20:08 2011 -0700 +++ b/jdk/src/share/classes/java/math/BigInteger.java Fri Sep 02 16:06:08 2011 -0700 @@ -31,6 +31,7 @@ import java.util.Random; import java.io.*; +import java.util.Arrays; /** * Immutable arbitrary-precision integers. All operations behave as if @@ -1612,14 +1613,12 @@ } else { // Array must be resized if (nBits <= (32-bitsInHighWord)) { int result[] = new int[nInts+len]; - for (int i=0; i>> 5; int[] mag = new int[numInts]; - for (int i=0; i>> nBits; @@ -2561,7 +2551,7 @@ if (signum < 0) { // Check if magnitude is a power of two boolean pow2 = (Integer.bitCount(mag[0]) == 1); - for(int i=1; i< len && pow2; i++) + for (int i=1; i< len && pow2; i++) pow2 = (mag[i] == 0); n = (pow2 ? magBitLength -1 : magBitLength);