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:

Gunnar Morling January 20, 2016 at 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.

Hardy Ferentschik January 20, 2016 at 3:02 PM

Where exactly does this come into play?

Fixed

Details

Assignee

Reporter

Bug Testcase Reminder (view)

Bug reports should generally be accompanied by a test case!

Bug Testcase Reminder (edit)

Bug reports should generally be accompanied by a test case!

Participants

Gunnar Morling
Hardy Ferentschik

Components

Priority

Created January 20, 2016 at 11:14 AM
Updated September 1, 2016 at 8:58 PM
Resolved January 26, 2016 at 7:19 PM

Flag notifications