Incorrect note in Javadoc for a few RandomGenerator methods
    Stig Rohde Døssing 
    stigdoessing at gmail.com
       
    Fri Jun 21 17:12:00 UTC 2024
    
    
  
Hi,
The Javadoc for RandomGenerator.nextLong(long origin, long bound) has this
to say:
Implementation Requirements:The default implementation checks that origin
and bound are positive longs
This doesn't seem to be true. The default implementation checks that origin
and bound are a valid range (that bound >= origin). The implementation
doesn't reject negative inputs.
The same note appears in the two-arg version of nextInt.
The note for e.g. nextDouble is correct and says "The default
implementation verifies that the origin and bound are valid"
I'm wondering if the notes for nextLong and nextInt should be updated to
match?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20240621/ab0c66d2/attachment.htm>
    
    
More information about the core-libs-dev
mailing list