A DESCRIPTION OF THE PROBLEM :
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"
The Javadoc for nextLong and nextInt should probably be updated to match.
FREQUENCY : always
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"
The Javadoc for nextLong and nextInt should probably be updated to match.
FREQUENCY : always
- csr for
-
JDK-8336288 Incorrect note in Javadoc for a few RandomGenerator methods
- Closed
- links to
-
Commit(master) openjdk/jdk/4c7b3e7f
-
Review(master) openjdk/jdk/20152