From e65786365671acee7d9744588fcbf6e37ebed68c Mon Sep 17 00:00:00 2001 From: Timofey Lagutin Date: Wed, 19 Nov 2014 14:06:31 +0300 Subject: [PATCH] String.equalsIgnoreCase(): fix nullptrex. It's logical and conforms OpenJDK.. --- 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 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; } }