Bug 59863 - JDK9 version number drops the leading "1."
Summary: JDK9 version number drops the leading "1."
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.9.7
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: 1.9.8
Assignee: Ant Notifications List
Depends on:
Reported: 2016-07-15 08:27 UTC by Stefan Bodewig
Modified: 2016-07-25 10:27 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Bodewig 2016-07-15 08:27:25 UTC
For context: http://openjdk.java.net/jeps/223

This is at least going to cause trouble for JavaEnvUtils as we are doing a simple String.compareTo comparison in isAtLeastJavaVersion - which is going to fail when comparing 9.2.4 to 10.0.1 or something similar.

There are most likely more cases where we rely on the Java version numbers starting with "1.".
Comment 1 Stefan Bodewig 2016-07-24 05:41:53 UTC
just saw one other case in antunit-base.xml we import from our antunit tests:

  <condition property="jdk1.9+">
    <contains string="${java.version}" substring="1.9."/>

this fails to detect Java9 right now.
Comment 2 Stefan Bodewig 2016-07-25 10:27:37 UTC
fixed with git commit 625d3d3 in 1.9.x and master