diff options
author | Gary Gregory <garydgregory@gmail.com> | 2022-07-05 10:25:46 -0400 |
---|---|---|
committer | Gary Gregory <garydgregory@gmail.com> | 2022-07-05 10:25:46 -0400 |
commit | 6001ae8a0c9f5815ee368ae1967d6de1b786a9e7 (patch) | |
tree | b00470c80be34071170bff859360e4357081b84d /src/main/java/org/apache/commons/lang3/SystemUtils.java | |
parent | edbaebb4d1e5b59da69a451eed5acb326c47879e (diff) | |
download | apache-commons-lang-6001ae8a0c9f5815ee368ae1967d6de1b786a9e7.tar.gz |
Add SystemUtils.IS_JAVA_17
Diffstat (limited to 'src/main/java/org/apache/commons/lang3/SystemUtils.java')
-rw-r--r-- | src/main/java/org/apache/commons/lang3/SystemUtils.java | 10 |
1 files changed, 10 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 4a810cdc0..12db15573 100644 --- a/src/main/java/org/apache/commons/lang3/SystemUtils.java +++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java @@ -1060,6 +1060,16 @@ public class SystemUtils { */ public static final boolean IS_JAVA_16 = getJavaVersionMatches("16"); + /** + * Is {@code true} if this is Java version 17 (also 17.x versions). + * <p> + * The field will return {@code false} if {@link #JAVA_VERSION} is {@code null}. + * </p> + * + * @since 3.13.0 + */ + public static final boolean IS_JAVA_17 = getJavaVersionMatches("17"); + // Operating system checks // ----------------------------------------------------------------------- // These MUST be declared after those above as they depend on the |