You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/09/11 16:58:20 UTC

[jira] [Commented] (LANG-1263) Add possibility to retrieve the current JavaVersion

    [ https://issues.apache.org/jira/browse/LANG-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15482040#comment-15482040 ] 

ASF GitHub Bot commented on LANG-1263:
--------------------------------------

GitHub user britter opened a pull request:

    https://github.com/apache/commons-lang/pull/187

    LANG-1263 Add possibility to retrieve the current JavaVersion

    Added a constant `CURRENT` to the `JavaVersion` enum which represents the JavaVersion for the `java.specification.version` system property. This allows for checks like this:
    
    ```java
    if(JavaVersion.CURRENT.atLeast(JAVA_1_6) {
      // do something only possible in Java 1.6+
    }
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/britter/commons-lang LANG-1263

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/187.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #187
    
----
commit 7c541954449659cf0bc8244ebf74d212cf7d9644
Author: Benedikt Ritter <br...@apache.org>
Date:   2016-09-11T15:25:24Z

    Remove method which merely delegates to JavaVersion.get(String)

commit 71f1b05f085dde9867551c67bfbb03f584bf55aa
Author: Benedikt Ritter <br...@apache.org>
Date:   2016-09-11T15:26:24Z

    Don't use wildcard imports

commit ef2e99772096885bf3302a617912d3519543d2b0
Author: Benedikt Ritter <br...@apache.org>
Date:   2016-09-11T15:47:53Z

    Add missing @since tags to JavaVersion

commit 565bd90e5be3a93c07292ee35dccb76d960dbac6
Author: Benedikt Ritter <br...@apache.org>
Date:   2016-09-11T16:50:04Z

    LANG-1263: Add possibility to retrieve the current JavaVersion.

----


> Add possibility to retrieve the current JavaVersion
> ---------------------------------------------------
>
>                 Key: LANG-1263
>                 URL: https://issues.apache.org/jira/browse/LANG-1263
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>            Reporter: Benedikt Ritter
>            Assignee: Benedikt Ritter
>             Fix For: 3.5
>
>
> Currently one has to iterate over all JavaVersion enum values and compare them to the value of java.specification.version in order to get the current JavaVersion enum value.
> Provide a convenient method for this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)