RFR: 8244535: JavaDoc search is overly strict with letter case

Jonathan Gibbons jjg at openjdk.java.net
Thu Nov 26 22:52:58 UTC 2020


On Thu, 26 Nov 2020 22:36:01 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> There is a certain amount of "two steps forward, one step back" here.
>> 
>> Yes, this is a good fix to the regression, so approved, and maybe it was an embarrassing convenience that the search test was disabled for the IndexBuilder work, but it is retrograde in that we're going back to a world with different sort orders for the static index pages, and interactive search.
>> 
>> FWIW, I like the conciseness of the change, which also helps highlight when comparators would be different ... i.e. for type elements with the same simple name.  With that in mind, I came up with the "test case" for when the comparators are different: the `ToolProvider` class, which is in both `java.util.spi` and `java.tools`, and these two instances sort differently in the two presentations.
>> 
>> Bottom line: this is a good fix, and a step in the right direction, but we should follow up with another fix to have the static index pages sort the same as the index pages.  I'm guessing that may mean reverting part of this change and improving `mainComparator`.
>
> I thought I saw a different order in the type declarations. I'll check 
> again.
> 
> -- Jon
> 
> On 11/26/20 12:38 PM, mlbridge[bot] wrote:
>>
>> /Mailing list message from Pavel Rappo <mailto:pavel.rappo at oracle.com> 
>> on javadoc-dev <mailto:javadoc-dev at openjdk.java.net>:/
>>
>> When I punch in `ToolProvider` I see 3 results in JDK 15 and 2 results 
>> on this change's sample page. Advantages are unclear.
>>
>> [JDK 15](https://docs.oracle.com/en/java/javase/15/docs/api/index.html):
>>
>> Types
>> java.util.spi.ToolProvider
>> javax.tools.ToolProvider
>> Members
>> javax.tools.ToolProvider.ToolProvider()
>>
>> [This change's sample 
>> page](http://cr.openjdk.java.net/~hannesw/8244535/api.01/):
>>
>> Types
>> java.util.spi.ToolProvider
>> javax.tools.ToolProvider
>>
>> Do you see a different picture?
>>
>>     On 26 Nov 2020, at 20:09, Jonathan Gibbons <jonathan.gibbons at
>>     oracle.com> wrote:
>>
>>     Pavel,
>>
>>     The way I read the code changes, you need to find examples of
>>     classes with the same name but in different packages. The example
>>     that came to mind for me is `ToolProvider`.
>>
>>     -- Jon
>>
>>     On 11/26/20 8:51 AM, Pavel Rappo wrote:
>>
>>>> You are receiving this because you were mentioned.
>> Reply to this email directly, view it on GitHub 
>> <https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/1354*issuecomment-734470787__;Iw!!GqivPVa7Brio!NZiTPiztuUcJlW_RGorpMF-3_FE5nRw8l_rFvinNmubWt1i6AJlWS5xe1yd0a6qWFT_Vxg$>, 
>> or unsubscribe 
>> <https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AOUXBRTJZZKGTW2R6HTMV5LSR24DZANCNFSM4T44FCTQ__;!!GqivPVa7Brio!NZiTPiztuUcJlW_RGorpMF-3_FE5nRw8l_rFvinNmubWt1i6AJlWS5xe1yd0a6qyPHyKyw$>.
>>

With the change, the behavior with the proposed patch is back to being the same as JDK 15, which is the indirect result of the direct goal to fix a broken test.

However, with the change, the sort order of the two instances of ToolProvider is different in the interactive search and static index.   This is a change from recent behavior in JDK 16 where the sort order is the same. Until this patch is pushed and a new promotion published, you can see the recent JDK 16 behavior here:  https://download.java.net/java/early_access/jdk16/docs/api/index.html

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

PR: https://git.openjdk.java.net/jdk/pull/1354


More information about the javadoc-dev mailing list