Skip to content

Commit 301a626

Browse files
committed
Fix NullPointerException in
org.apache.commons.lang3.SystemUtils.IS_OS_ANDROID
1 parent 9b383f3 commit 301a626

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ The <action> type attribute can be add,update,fix,remove.
9595
<action type="fix" dev="ggregory" due-to="Ken Dombeck">Fix Javadoc code examples in DiffBuilder and ReflectionDiffBuilder #1400.</action>
9696
<action type="fix" dev="ggregory" due-to="Gary Gregory">Fix generics in org.apache.commons.lang3.stream.Streams.toArray(Class) signature.</action>
9797
<action issue="LANG-1727" type="fix" dev="ggregory" due-to="Elliotte Rusty Harold, Gary Gregory">EventListenerSupport doesn't document ordering of events.</action>
98+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Fix NullPointerException in org.apache.commons.lang3.SystemUtils.IS_OS_ANDROID.</action>
9899
<!-- ADD -->
99100
<action type="add" dev="ggregory" due-to="Gary Gregory">Add Strings and refactor StringUtils.</action>
100101
<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>

src/main/java/org/apache/commons/lang3/SystemUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ public class SystemUtils {
11601160
*
11611161
* @since 3.15.0
11621162
*/
1163-
public static final boolean IS_OS_ANDROID = SystemProperties.getJavaVendor().contains("Android");
1163+
public static final boolean IS_OS_ANDROID = Strings.CS.contains(SystemProperties.getJavaVendor(), "Android");
11641164

11651165
/**
11661166
* The constant {@code true} if this is HP-UX.

0 commit comments

Comments
 (0)