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) {