Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7592F17F5C for ; Fri, 3 Apr 2015 12:09:13 +0000 (UTC) Received: (qmail 18475 invoked by uid 500); 3 Apr 2015 12:09:08 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 18405 invoked by uid 500); 3 Apr 2015 12:09:08 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 18396 invoked by uid 99); 3 Apr 2015 12:09:08 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2015 12:09:08 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 1B908AC0069 for ; Fri, 3 Apr 2015 12:09:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@commons.apache.org From: britter@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150403120908.1B908AC0069@hades.apache.org> 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 @@ + Support OS X versions in SystemUtils SystemUtils.IS_OS_WINDOWS_2008, VISTA are incorrect Parse test fails for TimeZone America/Sao_Paulo Add SystemUtils.IS_JAVA_1_9 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 { /** *

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

+ *

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

+ * + * @since 3.4 + */ + public static final boolean IS_OS_MAC_OSX_CHEETAH = getOSMatches("Mac OS X", "10.0"); + + /** + *

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

+ *

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

+ * + * @since 3.4 + */ + public static final boolean IS_OS_MAC_OSX_PUMA = getOSMatches("Mac OS X", "10.1"); + + /** + *

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

+ *

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

+ * + * @since 3.4 + */ + public static final boolean IS_OS_MAC_OSX_JAGUAR = getOSMatches("Mac OS X", "10.2"); + + /** + *

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

+ *

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

+ * + * @since 3.4 + */ + public static final boolean IS_OS_MAC_OSX_PANTHER = getOSMatches("Mac OS X", "10.3"); + + /** + *

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

+ *

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

+ * + * @since 3.4 + */ + public static final boolean IS_OS_MAC_OSX_TIGER = getOSMatches("Mac OS X", "10.4"); + + /** + *

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

+ *

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

+ * + * @since 3.4 + */ + public static final boolean IS_OS_MAC_OSX_LEOPARD = getOSMatches("Mac OS X", "10.5"); + + /** + *

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

+ *

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

+ * + * @since 3.4 + */ + public static final boolean IS_OS_MAC_OSX_SNOW_LEOPARD = getOSMatches("Mac OS X", "10.6"); + + /** + *

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

+ *

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

+ * + * @since 3.4 + */ + public static final boolean IS_OS_MAC_OSX_LION = getOSMatches("Mac OS X", "10.7"); + + /** + *

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

+ *

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

+ * + * @since 3.4 + */ + public static final boolean IS_OS_MAC_OSX_MOUNTAIN_LION = getOSMatches("Mac OS X", "10.8"); + + /** + *

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

+ *

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

+ * + * @since 3.4 + */ + public static final boolean IS_OS_MAC_OSX_MAVERICKS = getOSMatches("Mac OS X", "10.9"); + + /** + *

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

+ *

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

+ * + * @since 3.4 + */ + public static final boolean IS_OS_MAC_OSX_YOSEMITE = getOSMatches("Mac OS X", "10.10"); + + /** + *

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

*

@@ -1487,7 +1619,7 @@ public class SystemUtils { } return osName.startsWith(osNamePrefix); } - + /** * Decides if the operating system version matches. *