RFR: JDK-8309471: Limit key characters in static index pages [v4]
Jonathan Gibbons
jjg at openjdk.org
Fri Jun 16 14:49:06 UTC 2023
On Wed, 7 Jun 2023 10:27:19 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
>> Please review a simple change to avoid adding section index items (added in JDK-8286470) from appearing in the static index pages where the tend to cause trouble.
>>
>> The change is implemented by making `IndexItem.isTagItem()` behave true to its specification again and only return `true` if it actually represents a JavaDoc tag, and add a new `IndexItem.isSectionItem()` method for the new section index items. The new method is used to make sure section links are not listed in the index pages.
>
> Hannes Wallnöfer has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>
> Include sections in index pages but restrict key characters
Nice solution
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexBuilder.java line 307:
> 305: for (int i = 0; i < s.length(); i++) {
> 306: if (Character.isJavaIdentifierStart(s.charAt(i))) {
> 307: return Character.toUpperCase(s.charAt(i));
maybe use the overload that takes a locale, and use `Locale.ROOT`
-------------
Marked as reviewed by jjg (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/14312#pullrequestreview-1483678121
PR Review Comment: https://git.openjdk.org/jdk/pull/14312#discussion_r1232350306
More information about the javadoc-dev
mailing list