-
Bug
-
Resolution: Fixed
-
P2
-
8-repo-lambda
Methods:
http://download.java.net/lambda/b102/docs/api/java/util/SplittableRandom.html#nextInt(int)
http://download.java.net/lambda/b102/docs/api/java/util/SplittableRandom.html#nextDouble(double)
http://download.java.net/lambda/b102/docs/api/java/util/SplittableRandom.html#nextLong(long)
Specify:
"Parameters: bound - the bound on the random number to be returned. Must be positive."
but
"Throws: IllegalArgumentException - if bound is less than zero"
In fact zero bound leads to IllegalArgumentException as well.
new SplittableRandom().nextInt(0);
will throw
Exception in thread "main" java.lang.IllegalArgumentException: bound must be positive
at java.util.SplittableRandom.nextInt(SplittableRandom.java:476)
http://download.java.net/lambda/b102/docs/api/java/util/SplittableRandom.html#nextInt(int)
http://download.java.net/lambda/b102/docs/api/java/util/SplittableRandom.html#nextDouble(double)
http://download.java.net/lambda/b102/docs/api/java/util/SplittableRandom.html#nextLong(long)
Specify:
"Parameters: bound - the bound on the random number to be returned. Must be positive."
but
"Throws: IllegalArgumentException - if bound is less than zero"
In fact zero bound leads to IllegalArgumentException as well.
new SplittableRandom().nextInt(0);
will throw
Exception in thread "main" java.lang.IllegalArgumentException: bound must be positive
at java.util.SplittableRandom.nextInt(SplittableRandom.java:476)
- relates to
-
JDK-6781979 Please add nextLong(long n) method into Random class
- Closed