uschindler opened a new pull request, #12033:
URL: https://github.com/apache/lucene/pull/12033

   After many complaints that you need to use `--enable-preview` to use the new 
MMapDirectory with Java 19 (especially Elasticsearch peope where afraid that 
passing this flag enables other "unwanted features" in the JDK), this PR makes 
the class file exposed by javac "real java 19 production class files", by 
removing the preview flag from the class file.
   
   Actually this is exactly according to spec:
   - the class files are only marked with the flag to prevent them from being 
used in Java versions that do not suport that exact API level. This is no 
issue, because I also changed our provider code to load the new class files 
only on `Runtime.version().feature()==19`
   - there is nothing in the JDK that needs to be enabled. The preview features 
are always available (e.g. with reflection), the runtime flag is only to allow 
classloader to accept the "marked" class files.
   
   With this PR we use MMapDirectory by default on exactly Java 19. On Java 20 
it prints at moment a warning (like before). I will soon provide another MR-JAR 
variant for Java 20 (there were some significant API changes, so we need a 
separate SourceSet and compiler).
   
   If nobody objects, I will merge this around Xmas. I will add a CHANGES.txt 
entry mentioning this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to