Correctly interpret version string returned by JDK 9

Description

We evaluate the current Java version we are running on in order to enable Java 8 specific features on Java 8 and beyond. The format of the value for the system property "java.specification.version" has changed, so it returns "9" in Java 9 whereas it used to return "1.8.0" before. We run into an AAIOBE exception as we try to split the value at the dots and access the second element.

See JEP 223 for some background.

Environment

None

Activity

Show:
Hardy Ferentschik
January 20, 2016, 3:02 PM

Where exactly does this come into play?

Gunnar Morling
January 20, 2016, 4:15 PM

, I've updated the description. We examine the version in order to find out whether we are on 8 and beyond or not.

Assignee

Unassigned

Reporter

Gunnar Morling

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Major
Configure