RFR 8023155: Ensure functional consistency across Random, ThreadLocalRandom, SplittableRandom

Paul Sandoz paul.sandoz at oracle.com
Tue Aug 20 12:16:08 UTC 2013


[resending unsigned, sorry if a dup arrives later on]

On Aug 20, 2013, at 1:46 PM, Doug Lea <dl at cs.oswego.edu> wrote:

> On 08/19/2013 07:07 AM, Paul Sandoz wrote:
>> Hi,
>> 
>> This patch updates Random and ThreadLocalRandom to have functional consistency (for the most part) across Random, ThreadLocalRandom and SplittableRandom:
>> 
>>   http://cr.openjdk.java.net/~psandoz/tl/JDK-8023155-Random-TLR-SR-sync/webrev/
>> 
> 
> A couple of extra @since's crept in. See below.
> 

According to the spec diff new overriding methods are added to TLR:

  http://cr.openjdk.java.net/~psandoz/tl/JDK-8023155-Random-TLR-SR-sync/specdiff/java/util/concurrent/ThreadLocalRandom.html

  http://cr.openjdk.java.net/~psandoz/tl/JDK-8023155-Random-TLR-SR-sync/specdiff/java/util/Random.html

Is that sufficient motivation to add @since to such methods on TLR?


> 
>> 
>> I have yet to define a common interface e.g. RandomGenerator
> 
> After scrapping this idea twice now already for JDK8 time frame, I
> think leave it for JDK9.
> 

OK. I like the idea of an interface but i am concerned we don't have enough time to flesh out the contract. Personally i would prefer to manage this webrev minus an interface, otherwise i fear we will never get the patch in!

Paul.


More information about the core-libs-dev mailing list