diff options
author | Benedikt Ritter <beneritter@gmail.com> | 2019-04-05 18:33:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-05 18:33:35 +0200 |
commit | 6e797a40a7fb7d0e5abf555c0d179dd3937bdecb (patch) | |
tree | 6a80cb1b781a5523543275db420b210ff7889e25 /src/main/java/org/apache/commons/lang3/SystemUtils.java | |
parent | 3e37b25ebcc33134bd5d9476c00c5ed48477b0cf (diff) | |
download | apache-commons-lang-6e797a40a7fb7d0e5abf555c0d179dd3937bdecb.tar.gz |
LANG-1443: Add more SystemUtils.IS_JAVA_XX variants (#415)
Diffstat (limited to 'src/main/java/org/apache/commons/lang3/SystemUtils.java')
-rw-r--r-- | src/main/java/org/apache/commons/lang3/SystemUtils.java | 24 |
1 files changed, 24 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 cc51f1196..f5085cf4b 100644 --- a/src/main/java/org/apache/commons/lang3/SystemUtils.java +++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java @@ -997,6 +997,30 @@ public class SystemUtils { */ public static final boolean IS_JAVA_11 = getJavaVersionMatches("11"); + /** + * <p> + * Is {@code true} if this is Java version 12 (also 12.x versions). + * </p> + * <p> + * The field will return {@code false} if {@link #JAVA_VERSION} is {@code null}. + * </p> + * + * @since 3.9 + */ + public static final boolean IS_JAVA_12 = getJavaVersionMatches("12"); + + /** + * <p> + * Is {@code true} if this is Java version 13 (also 13.x versions). + * </p> + * <p> + * The field will return {@code false} if {@link #JAVA_VERSION} is {@code null}. + * </p> + * + * @since 3.9 + */ + public static final boolean IS_JAVA_13 = getJavaVersionMatches("13"); + // Operating system checks // ----------------------------------------------------------------------- // These MUST be declared after those above as they depend on the |