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
This commit is contained in:
parent
e6770d3c8c
commit
aa620e4294
@ -1,7 +1,11 @@
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user