[ 
https://issues.apache.org/jira/browse/LUCENE-8738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16818106#comment-16818106
 ] 

Uwe Schindler commented on LUCENE-8738:
---------------------------------------

Actually this is a bug in Java 11.0.2, introduced in the 2nd minor bugfix and 
affects all versions after.

This is the reason why Smoketester on ASF Jenkins works (it uses Java 11.0.1) 
and why the Javadocs are produced correctly on my local machine (original Java 
11 GA). In Java 11.0.2 they refactored some code in order to get cross-module 
links work correct. See https://bugs.openjdk.java.net/browse/JDK-8205593 
(backported to 11.0.2).

The bug is the following: Lucene has duplicate package names (e.g., the 
analysis module has standardanalyzer, but also the core module). Here the order 
of "link" elements when calling Javadocs matters, because the package names are 
searched in that order (so earlier package name wins). Before the Javadocs 
bugfix in Java 11.0.2 it built an internal map with package name -> directory 
(based on the package-names files). Before they ported it to modules they built 
the map by reading all the packages-files, checking if package is already in 
map and add it then. By that "first-wins" (it's only inserted when seen for 
first time). After the Javadocs patch, they containKey() was removed and all 
packages are added to map, so "last-wins". Because of that when building Lucene 
Javadocs, the last entry in the {{<link>}} ANT element wins.

Before: http://hg.openjdk.java.net/jdk/jdk/rev/f7d40158eb2f#l7.60 (see 
!containsKey)
After: http://hg.openjdk.java.net/jdk/jdk/rev/f7d40158eb2f#l7.196 (see the put 
at end, so if same package in same Jigsaw module "unnamed", its overwritten and 
so latest item wins)

So that means all of Lucene's Javadocs are broken after Java 11.0.2

[~jpountz]: How should we proceed? I dont want to stop the merge now, maybe 
just dsiable the link checking for now?

> Bump minimum Java version requirement to 11
> -------------------------------------------
>
>                 Key: LUCENE-8738
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8738
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: general/build
>            Reporter: Adrien Grand
>            Priority: Minor
>              Labels: Java11
>             Fix For: master (9.0)
>
>         Attachments: LUCENE-8738-solr-CoreCloseListener.patch
>
>
> See vote thread for reference: https://markmail.org/message/q6ubdycqscpl43aq.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to