[
https://issues.apache.org/jira/browse/LUCENE-5886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Uwe Schindler updated LUCENE-5886:
----------------------------------
Attachment: java9detection.patch
Here is a patch detecting Java 9 the "conventional way" (method lookup).
Roberts suggestion with java.specification.version is also good to investigate,
but has some problem:
Ryan Ernst removed StringUtils.versionComparator, so its not easy to do
"minimal" checks in Constants.java. People say that you should use
{{Double.parseDouble()}}, but this is broken after Java 10! In Constants we use
JRE_IS_MINIMUM_JAVA9, so it should be true for Java 10, too.
In common-build, we could theoretically hardly assign java.spec.version, but
this has the problem, that we then have to fix all <equals/> tasks around there
to support *all* later possible versions, which is impossible. Unfortunately
ANT has no version comparator as "task", so you always need a large "<or>" with
all possibilities. We could fix this with a groovy taskdef, providing a version
comparator (to be investigated).
This patch just adds a new entry to our ANT "enumeration": {{1.9}}, which is
detected by java.lang.Process#getPid() -> cool method for junit4, maybe
[~dweiss] can use it if available via reflection in the test runner!
I also fixed the remaining ant euquals checks to respect the new value.
In the near term, to use java.specification.version, we would need a good
ANT-based version comparator, too.
> current ecj-javadoc-lint crashes on SharedFSAutoReplicaFailoverUtilsTest.java
> -----------------------------------------------------------------------------
>
> Key: LUCENE-5886
> URL: https://issues.apache.org/jira/browse/LUCENE-5886
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
> Attachments: LUCENE-5886.patch, java9detection.patch
>
>
> It seems the version we are using has bugs that are tripped by this test.
> We are using 3.7.2, I think we should upgrade to 4.4?
> It seems to solve the issue for me.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]