RFR: 8307409: Refactor usage examples to use @snippet in the java.nio packages [v2]

Alan Bateman alanb at openjdk.org
Tue May 9 05:56:25 UTC 2023


On Tue, 9 May 2023 01:18:14 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Convert the `<pre>{@code ...}</pre>` and some other patterns to `{@snippet ..}`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8307409: Remove incorrect @link in @snippet

src/java.base/share/classes/java/nio/file/FileTreeIterator.java line 39:

> 37:  * An {@code Iterator} to iterate over the nodes of a file tree.
> 38:  *
> 39:  * {@snippet lang=java :

This is a JDK internal class so the example won't show up in the API docs, just FYI.

src/java.base/share/classes/java/nio/file/Path.java line 849:

> 847:      * invocation
> 848:      * {@snippet lang=java :
> 849:      *     register(watcher, events, new WatchEvent.Modifier[0]);

It looks like the link has been lost, try changing it to:

// @link substring="register" target="Watchable#register" :
register(watcher, events, new WatchEvent.Modifier[0]);

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13870#discussion_r1188163906
PR Review Comment: https://git.openjdk.org/jdk/pull/13870#discussion_r1188162797


More information about the nio-dev mailing list