commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1671043 - in /commons/proper/lang/trunk: RELEASE-NOTES.txt src/changes/changes.xml src/main/java/org/apache/commons/lang3/SystemUtils.java
Date Fri, 03 Apr 2015 12:09:07 GMT
Author: britter
Date: Fri Apr  3 12:09:07 2015
New Revision: 1671043

URL: http://svn.apache.org/r1671043
Log:
LANG-821: Support OS X versions in SystemUtils. This also fixes #59 from github. Thanks to
Timo Kockert.

Modified:
    commons/proper/lang/trunk/RELEASE-NOTES.txt
    commons/proper/lang/trunk/src/changes/changes.xml
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/SystemUtils.java

Modified: commons/proper/lang/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/RELEASE-NOTES.txt?rev=1671043&r1=1671042&r2=1671043&view=diff
==============================================================================
--- commons/proper/lang/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/lang/trunk/RELEASE-NOTES.txt Fri Apr  3 12:09:07 2015
@@ -31,6 +31,7 @@ For more information see https://issues.
 NEW FEATURES
 ==============
 
+o LANG-821:  Support OS X versions in SystemUtils. Thanks to Timo Kockert.
 o LANG-1103: Add SystemUtils.IS_JAVA_1_9
 o LANG-1093: Add ClassUtils.getAbbreviatedName(). Thanks to Fabian Lange.
 o LANG-1082: Add option to disable the "objectsTriviallyEqual" test in

Modified: commons/proper/lang/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/changes/changes.xml?rev=1671043&r1=1671042&r2=1671043&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/changes/changes.xml [utf-8] (original)
+++ commons/proper/lang/trunk/src/changes/changes.xml [utf-8] Fri Apr  3 12:09:07 2015
@@ -22,6 +22,7 @@
   <body>
 
   <release version="3.4" date="tba" description="tba">
+    <action issue="LANG-794" type="add" dev="britter" due-to="Timo Kockert">Support
OS X versions in SystemUtils</action>
     <action issue="LANG-794" type="fix" dev="britter" due-to="Timo Kockert">SystemUtils.IS_OS_WINDOWS_2008,
VISTA are incorrect</action>
     <action issue="LANG-1104" type="fix" dev="chas">Parse test fails for TimeZone America/Sao_Paulo</action>
     <action issue="LANG-1103" type="add" dev="britter">Add SystemUtils.IS_JAVA_1_9</action>

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/SystemUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/SystemUtils.java?rev=1671043&r1=1671042&r2=1671043&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/SystemUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/SystemUtils.java Fri
Apr  3 12:09:07 2015
@@ -1045,6 +1045,138 @@ public class SystemUtils {
 
     /**
      * <p>
+     * Is {@code true} if this is Mac OS X Cheetah.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.4
+     */
+    public static final boolean IS_OS_MAC_OSX_CHEETAH = getOSMatches("Mac OS X", "10.0");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Puma.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.4
+     */
+    public static final boolean IS_OS_MAC_OSX_PUMA = getOSMatches("Mac OS X", "10.1");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Jaguar.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.4
+     */
+    public static final boolean IS_OS_MAC_OSX_JAGUAR = getOSMatches("Mac OS X", "10.2");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Panther.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.4
+     */
+    public static final boolean IS_OS_MAC_OSX_PANTHER = getOSMatches("Mac OS X", "10.3");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Tiger.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.4
+     */
+    public static final boolean IS_OS_MAC_OSX_TIGER = getOSMatches("Mac OS X", "10.4");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Leopard.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.4
+     */
+    public static final boolean IS_OS_MAC_OSX_LEOPARD = getOSMatches("Mac OS X", "10.5");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Snow Leopard.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.4
+     */
+    public static final boolean IS_OS_MAC_OSX_SNOW_LEOPARD = getOSMatches("Mac OS X", "10.6");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Lion.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.4
+     */
+    public static final boolean IS_OS_MAC_OSX_LION = getOSMatches("Mac OS X", "10.7");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Mountain Lion.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.4
+     */
+    public static final boolean IS_OS_MAC_OSX_MOUNTAIN_LION = getOSMatches("Mac OS X", "10.8");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Mavericks.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.4
+     */
+    public static final boolean IS_OS_MAC_OSX_MAVERICKS = getOSMatches("Mac OS X", "10.9");
+
+    /**
+     * <p>
+     * Is {@code true} if this is Mac OS X Yosemite.
+     * </p>
+     * <p>
+     * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+     * </p>
+     *
+     * @since 3.4
+     */
+    public static final boolean IS_OS_MAC_OSX_YOSEMITE = getOSMatches("Mac OS X", "10.10");
+
+    /**
+     * <p>
      * Is {@code true} if this is FreeBSD.
      * </p>
      * <p>
@@ -1487,7 +1619,7 @@ public class SystemUtils {
         }
         return osName.startsWith(osNamePrefix);
     }
-    
+
     /**
      * Decides if the operating system version matches.
      * <p>



Mime
View raw message