Re: RFR: 8325304: Several classes in java.util.jar and java.util.zip don't specify the behaviour for null arguments [v3]
On Tue, 6 Feb 2024 12:30:10 GMT, Jaikiran Pai wrote: >> Can I please get a review of this doc-only change which updates the javadoc >> of several classes in `java.util.jar` and `java.util.zip` to specify their >> behaviour when `null` arguments are passed to the constructor or methods of >> those classes? >> >> For these updated classes, I have individually checked that they indeed >> throw a `NullPointerException` when `null` is passed to their constructor or >> methods. The couple of places where `null` is accepted have been updated to >> mention that `null` is allowed. > > Jaikiran Pai has updated the pull request incrementally with one additional > commit since the last revision: > > Lance's review - replace can cause with will cause The changes means that NPE is specified in both the class description and method descriptions in some cases, e.g. JarInputStream. I assume you meant to remove the NPE from methods where you've added a statement in the class description. Minor nit is some of the usages of `` in the change are inconsistent with the usages close by, you probably want to keep them consistent if you can. - PR Comment: https://git.openjdk.org/jdk/pull/17728#issuecomment-1929465055
Re: RFR: 8325304: Several classes in java.util.jar and java.util.zip don't specify the behaviour for null arguments [v3]
On Tue, 6 Feb 2024 12:30:10 GMT, Jaikiran Pai wrote: >> Can I please get a review of this doc-only change which updates the javadoc >> of several classes in `java.util.jar` and `java.util.zip` to specify their >> behaviour when `null` arguments are passed to the constructor or methods of >> those classes? >> >> For these updated classes, I have individually checked that they indeed >> throw a `NullPointerException` when `null` is passed to their constructor or >> methods. The couple of places where `null` is accepted have been updated to >> mention that `null` is allowed. > > Jaikiran Pai has updated the pull request incrementally with one additional > commit since the last revision: > > Lance's review - replace can cause with will cause Hello Lance, > I noticed you use "can cause" here and later use "will cause". I think we > should try to be consistent. > Perhaps we should use "will result in a..." My use of "can cause" was indeed inconsistent. I had used it in a couple of places. I have now updated the PR to replace with "will cause". I decided to use this "will cause" for consistency, since the text: > "Unless otherwise noted, passing a {@code null} argument to a constructor or > method in this class will cause a {@link NullPointerException} to be thrown." has been already in use in various other classes (for example `JarFile`'s javadoc) in the JDK even before the proposed changes in this PR. - PR Comment: https://git.openjdk.org/jdk/pull/17728#issuecomment-1929434263
Re: RFR: 8325304: Several classes in java.util.jar and java.util.zip don't specify the behaviour for null arguments [v3]
> Can I please get a review of this doc-only change which updates the javadoc > of several classes in `java.util.jar` and `java.util.zip` to specify their > behaviour when `null` arguments are passed to the constructor or methods of > those classes? > > For these updated classes, I have individually checked that they indeed throw > a `NullPointerException` when `null` is passed to their constructor or > methods. The couple of places where `null` is accepted have been updated to > mention that `null` is allowed. Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision: Lance's review - replace can cause with will cause - Changes: - all: https://git.openjdk.org/jdk/pull/17728/files - new: https://git.openjdk.org/jdk/pull/17728/files/e4c724fc..f92c5726 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=17728&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=17728&range=01-02 Stats: 6 lines in 2 files changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/17728.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/17728/head:pull/17728 PR: https://git.openjdk.org/jdk/pull/17728