Skip to content

Cleanup oal.util.Constants to use java.lang.Runtime.Version and remove outdated versions [LUCENE-10505] #11541

Open
@asfimport

Description

@asfimport

In oal.util.Constants we have some constants about the 64 bitness and Java version and vendor info. Especially theres also parsing of system properties to get major and minor Java version.

We should change this in main and 9.x to use https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runtime.html#version() and the corresponding Runtime.Version class. The Runtime.Version class also allows to compare in a safe way. The good thing is that you also get minor bugfix info, so code could disable stuff exactly at specific versions that are buggy.

We should also cleanup the constants. In 9.x and main we still have JRE_IS_MINIMUM_JAVA8! We should remove this constants (+ deprecate in 9.x and set to true) and change all code relying on the to execute code for java 8. Same for 11 and 17.


Migrated from LUCENE-10505 by Uwe Schindler (@uschindler)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions