JadiraOrg / jadira

Jadira Framework
Apache License 2.0
74 stars 44 forks source link

Add support for Java 9 VersionString Scheme (JEP 223) #63

Closed helospark closed 6 years ago

helospark commented 7 years ago

Background

In Java 9 the JEP223 has changed the format of java.version and now breaking the functionality of org.jadira.usertype.spi.utils.runtime.JavaVersion class. The representation of java.version will return as "9", "9.x.y", "9-ea", instead of the earlier format of 1.9.*

For early access release returns the string "9-ea", and therefore JavaVersion class throws an exception:

Caused by: java.lang.NumberFormatException: For input string: "9-ea"
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.base/java.lang.Integer.parseInt(Integer.java:652)
    at java.base/java.lang.Integer.parseInt(Integer.java:770)
    at org.jadira.usertype.spi.utils.runtime.JavaVersion.<clinit>(JavaVersion.java:15)

AC

z0mb1ek commented 7 years ago

cannot start on final jdk:

Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
    at org.jadira.usertype.spi.utils.runtime.JavaVersion.<clinit>(JavaVersion.java:16)
    ... 97 common frames omitted
Turini commented 7 years ago

Is there an update here? I'm going through the same problem. cc/ @chrisphe

davidkarlsen commented 6 years ago

Any update here? Should be a simple fix to apply.

chrisphe commented 6 years ago

I've applied the supplied pr... apologies for not getting on to this sooner

davidkarlsen commented 6 years ago

Awesome. Do you think you could do a release too?

chrisphe commented 6 years ago

Yes, will be building one, there's a few other issues I want to close off, but should be very soon.