From 8c18f27e89a53babb3f4440dc6d5598a15016fdb Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 28 Jul 2009 17:00:11 -0600 Subject: [PATCH] avoid NPE in String.equalsIgnoreCase --- classpath/java/lang/String.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classpath/java/lang/String.java b/classpath/java/lang/String.java index 1c11712da3..79dcc8ee75 100644 --- a/classpath/java/lang/String.java +++ b/classpath/java/lang/String.java @@ -235,7 +235,7 @@ public final class String } public boolean equalsIgnoreCase(String s) { - return this == s || compareToIgnoreCase(s) == 0; + return this == s || (s != null && compareToIgnoreCase(s) == 0); } public int compareTo(String s) {