diff --git a/classpath/java/lang/String.java b/classpath/java/lang/String.java index e3f301b4ca..b186bced4f 100644 --- a/classpath/java/lang/String.java +++ b/classpath/java/lang/String.java @@ -186,7 +186,7 @@ public final class String if (this == s) { return true; } else { - return s.length == length && compareToIgnoreCase(s) == 0; + return s != null && s.length == length && compareToIgnoreCase(s) == 0; } }