-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta
-
sparc
-
solaris_2.6
Name: ksR10052 Date: 06/26/2000
java.math.BigInteger(int bitLength, int certainty, Random rnd) hangs after several
calls to it. See test example.
Here is the example demonstrating the bug:
------------- test321.java -------------------------
public class test321 {
public static void main(String[] args) {
java.util.Random rnd=new java.util.Random(1);
BigInteger n;
n = new BigInteger(2,0,rnd);
n = new BigInteger(2,1,rnd);
n = new BigInteger(2,2,rnd);
n = new BigInteger(2,2,rnd);
n = new BigInteger(2,2,rnd);
n = new BigInteger(2,2,rnd);
System.out.println("test complete");
return;
}
}
========= Sample run (JDK1.4) ==========
/set/java/jdk1.4/solaris/bin/java test321
=========================== test hangs
========= Sample run (JDK1.3) ==========
java test321
test complete
========================================
======================================================================
- duplicates
-
JDK-4355248 java.math.BigInteger.probablePrime() hangs with bitLength=2
- Closed