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
3 changed files with 12 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue