You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Simon Spero (JIRA)" <ji...@apache.org> on 2017/06/27 20:48:00 UTC

[jira] [Created] (LANG-1342) JavaVersion is not consistent with JEP-223

Simon Spero created LANG-1342:
---------------------------------

             Summary: JavaVersion is not consistent with JEP-223
                 Key: LANG-1342
                 URL: https://issues.apache.org/jira/browse/LANG-1342
             Project: Commons Lang
          Issue Type: Bug
          Components: lang.*
    Affects Versions: 3.6
            Reporter: Simon Spero
            Priority: Minor


[JEP 223: New Version-String Syntax|http://openjdk.java.net/jeps/223] introduces a new syntax for version strings. 
This syntax is sort-of not incompatible with JavaVersion in 3.5, but this is likely to change as soon as someone finds a bug in JDK 9 after it's released.  There is a third specified version number component for security releases. Unlike the rest of the full version string, this component is significant for ordering, and cannot reliably be mapped to float. 

JEP 223 defines some regular expressions.  It also defines an api class (java.lang.Runtime.Version).  This class can't be used directly (since it's new with JDK-9), and the  API can't be directly emulated, as it requires java.lang.Optional.  However, it's not rocket science  (it is however regular expressions, so now you have problems 2.0).    

I'll take a crack at a class implementing JEP-223 Versions and try to get them to play with JavaVersion.  

The existing mapping to float is unsuited to minor versions, so there has to be some new hackery  for java 9 even for two components.  ( JDK 9.11 should be >  JDK 9.2 )

Since there's no java minor releases yet, there's a bit of freedom.  If the range of minor and patch versions is restricted to values between 0 and 99 there should be a way to make things work. 

Ideally the floaty stuff can be deprecated for removal before that matters. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)