You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/01/01 16:12:29 UTC

[commons-lang] branch master updated: Add recent macOS versions.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new 733768a  Add recent macOS versions.
     new 1068e2a  Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-lang.git
733768a is described below

commit 733768a6d9d0d8f7b419575fa53b431d2e5d35b6
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jan 1 11:12:07 2021 -0500

    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)
---
 .../java/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 8ef945c..60478b3 100644
--- a/src/main/java/org/apache/commons/lang3/SystemUtils.java
+++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java
@@ -1288,6 +1288,66 @@ public class SystemUtils {
 
     /**
      * <p>
+     * Is {@code true} if this is Mac OS X Sierra.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.12
+     */
+    public static final boolean IS_OS_MAC_OSX_SIERRA = getOsMatches("Mac OS X", "10.12");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X High Sierra.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.12
+     */
+    public static final boolean IS_OS_MAC_OSX_HIGH_SIERRA = getOsMatches("Mac OS X", "10.13");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Mojave.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.12
+     */
+    public static final boolean IS_OS_MAC_OSX_MOJAVE = getOsMatches("Mac OS X", "10.14");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Catalina.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.12
+     */
+    public static final boolean IS_OS_MAC_OSX_CATALINA = getOsMatches("Mac OS X", "10.15");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Big Sur.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.12
+     */
+    public static final boolean IS_OS_MAC_OSX_BIG_SUR = getOsMatches("Mac OS X", "10.16");
+
+    /**
+     * <p>
      * Is {@code true} if this is FreeBSD.
      * </p>
      * <p>