From 031f6b082ff21cf1138907a7c666d6ff391bfd72 Mon Sep 17 00:00:00 2001 From: ggregory Date: Fri, 20 May 2016 10:24:35 -0700 Subject: [PATCH] [LANG-1168] Add SystemUtils.IS_OS_WINDOWS_10 property. --- src/changes/changes.xml | 1 + .../java/org/apache/commons/lang3/SystemUtils.java | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 40eaee4c5..034de39c7 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -22,6 +22,7 @@ + Add SystemUtils.IS_OS_WINDOWS_10 property DiffBuilder: Add null check on fieldName when appending Object or Object[] ArrayUtils.removeAll(Object array, int... indices) should do the clone, not its callers Performance improvements for NumberUtils.isParsable diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java index c37f47dc2..ef1d43a38 100644 --- a/src/main/java/org/apache/commons/lang3/SystemUtils.java +++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java @@ -1434,6 +1434,18 @@ public class SystemUtils { */ public static final boolean IS_OS_WINDOWS_8 = getOSMatchesName(OS_NAME_WINDOWS_PREFIX + " 8"); + /** + *

+ * Is {@code true} if this is Windows 10. + *

+ *

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

+ * + * @since 3.5 + */ + public static final boolean IS_OS_WINDOWS_10 = getOSMatchesName(OS_NAME_WINDOWS_PREFIX + " 10"); + /** *

* Is {@code true} if this is z/OS.