Skip to content

8264779: Fix doclint warnings in java/nio #3376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

c-cleary
Copy link
Contributor

@c-cleary c-cleary commented Apr 7, 2021

This fix addresses the following warnings which were generated by building JDK API documentation with the -Xdoclint:all option enabled:

./build/linux-x64/support/gensrc/java.base/java/nio/charset/IllegalCharsetNameException.java:47: warning: no comment
    private String charsetName;
                   ^
./open/src/java.base/share/classes/java/nio/charset/MalformedInputException.java:44: warning: no comment
    private int inputLength;
                ^
./open/src/java.base/share/classes/java/nio/charset/UnmappableCharacterException.java:44: warning: no comment
    private int inputLength;
                ^
./build/linux-x64/support/gensrc/java.base/java/nio/charset/UnsupportedCharsetException.java:47: warning: no comment
    private String charsetName;
                   ^
./open/src/java.base/share/classes/java/nio/file/DirectoryIteratorException.java:81: warning: no @param for s
    private void readObject(ObjectInputStream s)
                 ^
./open/src/java.base/share/classes/java/nio/file/DirectoryIteratorException.java:81: warning: no @throws for java.lang.ClassNotFoundException
    private void readObject(ObjectInputStream s)
                 ^
./open/src/java.base/share/classes/java/nio/file/FileSystemException.java:43: warning: no comment
    private final String file;
                         ^
./open/src/java.base/share/classes/java/nio/file/FileSystemException.java:44: warning: no comment
    private final String other;
                         ^
./open/src/java.base/share/classes/java/nio/file/InvalidPathException.java:43: warning: no comment
    private int index;
                ^
./open/src/java.base/share/classes/java/nio/file/InvalidPathException.java:42: warning: no comment
    private String input;
                   ^
./open/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java:43: warning: no comment
    private final String name;
                         ^

Changes to genExceptions.sh and the two exceptions templates are to address the warnings concerned with UnsupportedCharsetException.java and IllegalCharsetNameException.java which are generated when make jdk-image is run.

CSR: https://bugs.openjdk.java.net/browse/JDK-8264844


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3376/head:pull/3376
$ git checkout pull/3376

Update a local copy of the PR:
$ git checkout pull/3376
$ git pull https://git.openjdk.java.net/jdk pull/3376/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3376

View PR using the GUI difftool:
$ git pr show -t 3376

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3376.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 7, 2021

👋 Welcome back ccleary! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 7, 2021
@c-cleary
Copy link
Contributor Author

c-cleary commented Apr 7, 2021

/csr

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Apr 7, 2021
@openjdk
Copy link

openjdk bot commented Apr 7, 2021

@c-cleary has indicated that a compatibility and specification (CSR) request is needed for this pull request.
@c-cleary please create a CSR request and add link to it in JDK-8264779. This pull request cannot be integrated until the CSR request is approved.

@openjdk
Copy link

openjdk bot commented Apr 7, 2021

@c-cleary The following label will be automatically applied to this pull request:

  • build

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the build build-dev@openjdk.org label Apr 7, 2021
@mlbridge
Copy link

mlbridge bot commented Apr 7, 2021

Webrevs

@AlanBateman
Copy link
Contributor

/label add nio

@openjdk openjdk bot added the nio nio-dev@openjdk.org label Apr 7, 2021
@openjdk
Copy link

openjdk bot commented Apr 7, 2021

@AlanBateman
The nio label was successfully added.

@@ -39,7 +39,15 @@
@java.io.Serial
static final long serialVersionUID = 4355821422286746137L;

/**
* The invalid input path string.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be "The input string" to be consistent with the getInput method.

@@ -40,6 +40,9 @@
@java.io.Serial
static final long serialVersionUID = -5369283889045833024L;

/**
* The name of the {@code UserPrincipal} that does not exist.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to use "user principal name" so that it is consistent with getName.

Copy link
Contributor Author

@c-cleary c-cleary Apr 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Alan, will update as you suggest shortly with respect to both of your comments (also thanks for adding the nio label!)

@@ -41,6 +41,9 @@
@java.io.Serial
private static final long serialVersionUID = -3438823399834806194L;

/**
* The length of the input byte sequence.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this comment also refer to the character sequence?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could, maybe something like "The length of the input byte (or character) sequence." would work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or just "The length of the input" so that it is consistent with the description of the getInputLength method.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to "The length of the input." in the most recent commit.

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Apr 8, 2021
@openjdk
Copy link

openjdk bot commented Apr 8, 2021

@c-cleary This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8264779: Fix doclint warnings in java/nio

Reviewed-by: chegar, iris, alanb, naoto

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 41 new commits pushed to the master branch:

  • 3e57924: 8264885: Fix the code style of macro in aarch64_neon_ad.m4
  • 051c117: 8264923: PNGImageWriter.write_zTXt throws Exception with a typo
  • 1c6b113: 8264513: Cleanup CardTableBarrierSetC2::post_barrier
  • 666fd62: 8264881: Remove the old development option MemProfiling
  • 951f277: 8264874: Build interim-langtools for HotSpot only if Graal is enabled
  • 719f95e: 8260693: Provide the support for specifying a signer in keytool -genkeypair
  • 77b1673: 8256245: AArch64: Implement Base64 decoding intrinsic
  • 57f1e7d: 8264696: Multi-catch clause causes compiler exception because it uses the package-private supertype
  • 3d2b4cc: 8264864: Multiple byte tag not supported by ASN.1 encoding
  • ccefa5e: 8261625: Add Elements.isAutomaticModule(ModuleElement)
  • ... and 31 more: https://git.openjdk.java.net/jdk/compare/4bb80f3720936d0cd9836e4f9c7233d2b4d8eee3...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@ChrisHegarty, @irisclark, @AlanBateman, @naotoj) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 8, 2021
@c-cleary
Copy link
Contributor Author

c-cleary commented Apr 9, 2021

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Apr 9, 2021
@openjdk
Copy link

openjdk bot commented Apr 9, 2021

@c-cleary
Your change (at version 9f36eec) is now ready to be sponsored by a Committer.

@ChrisHegarty
Copy link
Member

/sponsor

@openjdk openjdk bot closed this Apr 9, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 9, 2021
@openjdk
Copy link

openjdk bot commented Apr 9, 2021

@ChrisHegarty @c-cleary Since your change was applied there have been 41 commits pushed to the master branch:

  • 3e57924: 8264885: Fix the code style of macro in aarch64_neon_ad.m4
  • 051c117: 8264923: PNGImageWriter.write_zTXt throws Exception with a typo
  • 1c6b113: 8264513: Cleanup CardTableBarrierSetC2::post_barrier
  • 666fd62: 8264881: Remove the old development option MemProfiling
  • 951f277: 8264874: Build interim-langtools for HotSpot only if Graal is enabled
  • 719f95e: 8260693: Provide the support for specifying a signer in keytool -genkeypair
  • 77b1673: 8256245: AArch64: Implement Base64 decoding intrinsic
  • 57f1e7d: 8264696: Multi-catch clause causes compiler exception because it uses the package-private supertype
  • 3d2b4cc: 8264864: Multiple byte tag not supported by ASN.1 encoding
  • ccefa5e: 8261625: Add Elements.isAutomaticModule(ModuleElement)
  • ... and 31 more: https://git.openjdk.java.net/jdk/compare/4bb80f3720936d0cd9836e4f9c7233d2b4d8eee3...master

Your commit was automatically rebased without conflicts.

Pushed as commit a45733f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org integrated Pull request has been integrated nio nio-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

5 participants