On Thu, 4 Apr 2024 12:28:13 GMT, Pavel Rappo <[email protected]> wrote:
>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlIds.java
>> line 571:
>>
>>> 569: var list = Stream.concat(Stream.concat(ctors.stream(),
>>> methods.stream()), otherMethods.stream())
>>> 570: .map(e1 -> (ExecutableElement) e1)
>>> 571: .toList();
>>
>> We can maybe do something like:
>>
>> record ErasureCheck(ExecutableElement element, HtmlId erasure) {}
>>
>> // ...
>> .map(e1 -> new ErasureCheck(e1, forErasure(e1)))
>> .collect(Collectors.groupingBy(check -> check.erasure == null));
>>
>> // 1. Map all elements that can _only_ be addressed by the simple id
>> for (var m : groups.get(true)) {...}
>
> I addressed that in c7ea01c0cab. It looks leaner (`forErasure` is now called
> once), but is that as readable as you might have thought it would be?
Looks great, thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18519#discussion_r1551777805