diff options
author | Gary Gregory <ggregory@apache.org> | 2017-11-03 11:33:34 -0600 |
---|---|---|
committer | Gary Gregory <ggregory@apache.org> | 2017-11-03 11:33:34 -0600 |
commit | a618b844c5a261ced37385ab3947de6e215d46f7 (patch) | |
tree | 2bb3a99205cdb7f2a5ccdddd8fe8171948f2bb3b /src/main/java/org/apache/commons/lang3/SystemUtils.java | |
parent | a26c66a8edcf029ca5f94354cee0db267e9ccc20 (diff) | |
download | apache-commons-lang-a618b844c5a261ced37385ab3947de6e215d46f7.tar.gz |
[LANG-1365] Fix NullPointerException in isJavaVersionAtLeast on Java 10,
add SystemUtils.IS_JAVA_10, add JavaVersion.JAVA_10.
Diffstat (limited to 'src/main/java/org/apache/commons/lang3/SystemUtils.java')
-rw-r--r-- | src/main/java/org/apache/commons/lang3/SystemUtils.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java index 50d260ba0..74a90fca5 100644 --- a/src/main/java/org/apache/commons/lang3/SystemUtils.java +++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java @@ -973,6 +973,18 @@ public class SystemUtils { */ public static final boolean IS_JAVA_9 = getJavaVersionMatches("9"); + /** + * <p> + * Is {@code true} if this is Java version 10 (also 10.x versions). + * </p> + * <p> + * The field will return {@code false} if {@link #JAVA_VERSION} is {@code null}. + * </p> + * + * @since 3.7 + */ + public static final boolean IS_JAVA_10 = getJavaVersionMatches("10"); + // Operating system checks // ----------------------------------------------------------------------- // These MUST be declared after those above as they depend on the |