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
commit 301a6261c97f7848a2526f5b40d9fc8c92d1c0f9 Author: Gary Gregory <[email protected]> AuthorDate: Wed Jun 25 09:24:25 2025 -0400 Fix NullPointerException in org.apache.commons.lang3.SystemUtils.IS_OS_ANDROID --- src/changes/changes.xml | 1 + src/main/java/org/apache/commons/lang3/SystemUtils.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index cab8217d7..93b560588 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -95,6 +95,7 @@ The <action> type attribute can be add,update,fix,remove. <action type="fix" dev="ggregory" due-to="Ken Dombeck">Fix Javadoc code examples in DiffBuilder and ReflectionDiffBuilder #1400.</action> <action type="fix" dev="ggregory" due-to="Gary Gregory">Fix generics in org.apache.commons.lang3.stream.Streams.toArray(Class) signature.</action> <action issue="LANG-1727" type="fix" dev="ggregory" due-to="Elliotte Rusty Harold, Gary Gregory">EventListenerSupport doesn't document ordering of events.</action> + <action type="fix" dev="ggregory" due-to="Gary Gregory">Fix NullPointerException in org.apache.commons.lang3.SystemUtils.IS_OS_ANDROID.</action> <!-- ADD --> <action type="add" dev="ggregory" due-to="Gary Gregory">Add Strings and refactor StringUtils.</action> <action issue="LANG-1747" type="add" dev="ggregory" due-to="Oliver B. Fischer, Gary Gregory">Add StopWatch.run([Failable]Runnable) and get([Failable]Supplier).</action> diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java index 3a37a3ae7..dec918a8c 100644 --- a/src/main/java/org/apache/commons/lang3/SystemUtils.java +++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java @@ -1160,7 +1160,7 @@ public class SystemUtils { * * @since 3.15.0 */ - public static final boolean IS_OS_ANDROID = SystemProperties.getJavaVendor().contains("Android"); + public static final boolean IS_OS_ANDROID = Strings.CS.contains(SystemProperties.getJavaVendor(), "Android"); /** * The constant {@code true} if this is HP-UX.
