RFR: JDK-8298405: Support Markdown in Documentation Comments [v6]
Jonathan Gibbons
jjg at openjdk.org
Fri Feb 9 21:04:14 UTC 2024
On Mon, 15 Jan 2024 11:48:23 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> Jonathan Gibbons has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
>>
>> - Merge with upstream/master
>> - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3
>> - Address review comments
>> - Fix whitespace
>> - Improve handling of embedded inline taglets
>> - Customize support for Markdown headings
>> - JDK-8298405: Support Markdown in Documentation Comments
>
> src/jdk.compiler/share/classes/com/sun/source/util/DocTreeFactory.java line 299:
>
>> 297: * @param code the code
>> 298: * @return a {@code RawTextTree} object
>> 299: * @throws IllegalArgumentException if the kind is not a recognized kind for raw text
>
> This method's implementation also throws `NullPointerException` if kind is null, which is unusual for these methods. You can either add `@throws`, or workaround it by using `String.valueOf(kind)` instead of `kind.toString()` down in the implementation.
It took me a while to understand this comment.
For here and now, I will use `String.valueOf(kind)`
Long term, it would be good to better document `null` behavior in this API.
[JDK-8325577](https://bugs.openjdk.org/browse/JDK-8325577)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1484798682
More information about the build-dev
mailing list