JDK 9 RFR of 8026236: Add PrimeTest for BigInteger [TEST-ONLY]

Joe Darcy joe.darcy at oracle.com
Sat May 3 16:55:36 UTC 2014

Hi Brian,

I think the parsePrimes method would be better with a different name 
since no parsing is occurring anymore.

I think someone in this test the fact that Integer.MAX_VALUE is a prime 
should be mentioned in taken advantage of :-)  How about adding another 
test method which tests some Mersenne primes for primality? [1]

I'd prefer to see some comments on the primes method briefly explaining 
it methodology. Would the running time be unacceptable (or memory usage 
too large) if the limit were set to Integer.MAX_VALUE?



[1] http://en.wikipedia.org/wiki/Mersenne_prime

On 5/2/2014 2:22 PM, Brian Burkhalter wrote:
> Prod!
> On Apr 28, 2014, at 4:02 PM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
>> Here is an updated patch
>> http://cr.openjdk.java.net/~bpb/8026236/webrev.02/
>> which has been revised to obviate the need for a file source of prime numbers.
>> Thanks,
>> Brian
>> On Apr 24, 2014, at 5:12 PM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
>>> I have posted an updated patch here:
>>> http://cr.openjdk.java.net/~bpb/8026236/webrev.01/
>>> Thanks for your comments.

More information about the core-libs-dev mailing list