RFR: 8264779: Fix doclint warnings in java/nio

Alan Bateman alanb at openjdk.java.net
Wed Apr 7 13:51:26 UTC 2021


On Wed, 7 Apr 2021 13:22:44 GMT, Conor Cleary <ccleary at openjdk.org> wrote:

> 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`](https://github.com/openjdk/jdk/commit/b729d8ed7970737a8a2d4e8aa788df33789faea2) and the two [`exceptions`](https://github.com/openjdk/jdk/commit/b729d8ed7970737a8a2d4e8aa788df33789faea2) templates are to address the warnings concerned with `UnsupportedCharsetException.java` and `IllegalCharsetNameException.java` which are generated when `make jdk-image` is run. A CSR will be filed in due course with respect to these changes.

src/java.base/share/classes/java/nio/file/InvalidPathException.java line 44:

> 42:     /**
> 43:      * The invalid input path string.
> 44:      */

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

src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java line 44:

> 42: 
> 43:     /**
> 44:      * The name of the {@code UserPrincipal} that does not exist.

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

-------------

PR: https://git.openjdk.java.net/jdk/pull/3376


More information about the nio-dev mailing list