Commit aa620e42 by Bryce McKinlay Committed by Bryce McKinlay

natString.cc (equalsIgnoreCase): return false if anotherString is null.

        * java/lang/natString.cc (equalsIgnoreCase): return false if
        anotherString is null.
        * java/lang/Boolean.java (valueOf): return FALSE if argument is
        null.

From-SVN: r30763
parent e6770d3c
1999-12-02 Bryce McKinlay <bryce@albatross.co.nz>
* libjava/java/net/ServerSocket.java (ServerSocket): Bind to any
interface if bindAddr is null.
* java/net/ServerSocket.java (ServerSocket): Bind to any interface
if bindAddr is null.
* java/lang/natString.cc (equalsIgnoreCase): return false if
anotherString is null.
* java/lang/Boolean.java (valueOf): return FALSE if argument is
null.
1999-11-30 Tom Tromey <tromey@cygnus.com>
......
......@@ -89,7 +89,10 @@ public final class Boolean extends Object implements Serializable
public static Boolean valueOf(String str)
{
/* This returns a Boolean (big B), not a boolean (little b). */
return str.equalsIgnoreCase("true") ? TRUE : FALSE;
if (str == null)
return FALSE;
else
/* This returns a Boolean (big B), not a boolean (little b). */
return str.equalsIgnoreCase("true") ? TRUE : FALSE;
}
}
......@@ -524,7 +524,7 @@ java::lang::String::toCharArray()
jboolean
java::lang::String::equalsIgnoreCase (jstring anotherString)
{
if (count != anotherString->count)
if (anotherString == NULL || count != anotherString->count)
return false;
register jchar *tptr = JvGetStringChars (this);
register jchar *optr = JvGetStringChars (anotherString);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment