RFR: JDK-8298405: Support Markdown in Documentation Comments [v4]
Jonathan Gibbons
jjg at openjdk.org
Wed Nov 15 00:39:32 UTC 2023
On Wed, 8 Nov 2023 17:37:25 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix whitespace
>
> test/langtools/jdk/javadoc/tool/testTransformer/TestTransformer.java line 96:
>
>> 94: var sl = ServiceLoader.load(DocTrees.DocCommentTreeTransformer.class);
>> 95: return StreamSupport.stream(sl.spliterator(), false)
>> 96: .filter(p -> p.name().equals(name))
>
> ServiceLoader specification suggests another way of streaming:
> Suggestion:
>
> return sl.stream()
> .map(ServiceLoader.Provider::get)
> .filter(t -> t.name().equals(name))
>
> Would it be the same and more readable?
Hmm. It's longer, but arguably simpler to comprehend than using a spliterator. I've changed the code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1393484918
More information about the compiler-dev
mailing list