From 733768a6d9d0d8f7b419575fa53b431d2e5d35b6 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Fri, 1 Jan 2021 11:12:07 -0500 Subject: [PATCH] Add recent macOS versions. macOS 10.12 Sierra macOS 10.13 High Sierra macOS 10.14 Mojave macOS 10.15 Catalina macOS 10.16 Big Sur (a.k.a. 11.0, 11.1) --- .../org/apache/commons/lang3/SystemUtils.java | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java index 8ef945c6c..60478b30c 100644 --- a/src/main/java/org/apache/commons/lang3/SystemUtils.java +++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java @@ -1286,6 +1286,66 @@ public class SystemUtils { */ public static final boolean IS_OS_MAC_OSX_EL_CAPITAN = getOsMatches("Mac OS X", "10.11"); + /** + *

+ * Is {@code true} if this is Mac OS X Sierra. + *

+ *

+ * The field will return {@code false} if {@code OS_NAME} is {@code null}. + *

+ * + * @since 3.12 + */ + public static final boolean IS_OS_MAC_OSX_SIERRA = getOsMatches("Mac OS X", "10.12"); + + /** + *

+ * Is {@code true} if this is Mac OS X High Sierra. + *

+ *

+ * The field will return {@code false} if {@code OS_NAME} is {@code null}. + *

+ * + * @since 3.12 + */ + public static final boolean IS_OS_MAC_OSX_HIGH_SIERRA = getOsMatches("Mac OS X", "10.13"); + + /** + *

+ * Is {@code true} if this is Mac OS X Mojave. + *

+ *

+ * The field will return {@code false} if {@code OS_NAME} is {@code null}. + *

+ * + * @since 3.12 + */ + public static final boolean IS_OS_MAC_OSX_MOJAVE = getOsMatches("Mac OS X", "10.14"); + + /** + *

+ * Is {@code true} if this is Mac OS X Catalina. + *

+ *

+ * The field will return {@code false} if {@code OS_NAME} is {@code null}. + *

+ * + * @since 3.12 + */ + public static final boolean IS_OS_MAC_OSX_CATALINA = getOsMatches("Mac OS X", "10.15"); + + /** + *

+ * Is {@code true} if this is Mac OS X Big Sur. + *

+ *

+ * The field will return {@code false} if {@code OS_NAME} is {@code null}. + *

+ * + * @since 3.12 + */ + public static final boolean IS_OS_MAC_OSX_BIG_SUR = getOsMatches("Mac OS X", "10.16"); + /** *

* Is {@code true} if this is FreeBSD.