Integrated: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods
On Fri, 12 Jul 2024 06:28:15 GMT, Raffaello Giulietti wrote: > Small corrections to @implSpec notes in a few methods in RandomGenerator. This pull request has now been integrated. Changeset: 4c7b3e7f Author:Raffaello Giulietti URL: https://git.openjdk.org/jdk/commit/4c7b3e7fc39a06e208ea1668095d055457549d63 Stats: 28 lines in 1 file changed: 0 ins; 5 del; 23 mod 8334758: Incorrect note in Javadoc for a few RandomGenerator methods Reviewed-by: bpb - PR: https://git.openjdk.org/jdk/pull/20152
Re: RFR: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods [v2]
On Fri, 19 Jul 2024 17:08:38 GMT, Raffaello Giulietti wrote: > I guess that the approval of the CSR, once done, would "de-facto" count as a > 2nd review? I agree. - PR Comment: https://git.openjdk.org/jdk/pull/20152#issuecomment-2239863660
Re: RFR: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods [v2]
On Fri, 19 Jul 2024 16:50:50 GMT, Raffaello Giulietti wrote: >> Small corrections to @implSpec notes in a few methods in RandomGenerator. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Improved wording. I guess that the approval of the CSR, once done, would "de-facto" count as a 2nd review? After all, this is a "CSR only" change. - PR Comment: https://git.openjdk.org/jdk/pull/20152#issuecomment-2239698670
Re: RFR: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods [v2]
On Fri, 19 Jul 2024 16:50:50 GMT, Raffaello Giulietti wrote: >> Small corrections to @implSpec notes in a few methods in RandomGenerator. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Improved wording. Looks fine but maybe a second Reviewer should agree? - Marked as reviewed by bpb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20152#pullrequestreview-2188720979
Re: RFR: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods [v2]
> Small corrections to @implSpec notes in a few methods in RandomGenerator. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Improved wording. - Changes: - all: https://git.openjdk.org/jdk/pull/20152/files - new: https://git.openjdk.org/jdk/pull/20152/files/b66988cd..f3f1bd6e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=20152&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20152&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/20152.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20152/head:pull/20152 PR: https://git.openjdk.org/jdk/pull/20152
Re: RFR: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods
On Fri, 12 Jul 2024 06:28:15 GMT, Raffaello Giulietti wrote: > Small corrections to @implSpec notes in a few methods in RandomGenerator. src/java.base/share/classes/java/util/random/RandomGenerator.java line 816: > 814: * distribution in the range 0 (inclusive) > 815: * to {@code bound} (exclusive). > 816: * It assumes the distribution of {@link #nextInt()} to be uniform > in turn. Do you need "in turn" here (and in the other changes)? - PR Review Comment: https://git.openjdk.org/jdk/pull/20152#discussion_r1684617106
RFR: 8334758: Incorrect note in Javadoc for a few RandomGenerator methods
Small corrections to @implSpec notes in a few methods in RandomGenerator. - Commit messages: - 8334758: Incorrect note in Javadoc for a few RandomGenerator methods Changes: https://git.openjdk.org/jdk/pull/20152/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20152&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8334758 Stats: 28 lines in 1 file changed: 0 ins; 5 del; 23 mod Patch: https://git.openjdk.org/jdk/pull/20152.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20152/head:pull/20152 PR: https://git.openjdk.org/jdk/pull/20152
Re: Incorrect note in Javadoc for a few RandomGenerator methods
Thanks, filed 9077206. Den fre. 21. jun. 2024 kl. 21.06 skrev Raffaello Giulietti < raffaello.giulie...@oracle.com>: > Hi, > > your observation seems correct. > > In order to file a properly tracked bug report, please proceed according > to this guide: > > > https://docs.oracle.com/en/java/javase/22/troubleshoot/submit-bug-report.html > > Thanks > > > > On 2024-06-21 19:12, Stig Rohde Døssing wrote: > > 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? >
Re: Incorrect note in Javadoc for a few RandomGenerator methods
Hi, your observation seems correct. In order to file a properly tracked bug report, please proceed according to this guide: https://docs.oracle.com/en/java/javase/22/troubleshoot/submit-bug-report.html Thanks On 2024-06-21 19:12, Stig Rohde Døssing wrote: 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?
Incorrect note in Javadoc for a few RandomGenerator methods
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?