Boolean.java (Boolean(String)): Set Value' to false on a null String constructor parameter.
1999-12-16 Bryce McKinlay <bryce@albatross.co.nz> * java/lang/Boolean.java (Boolean(String)): Set Value' to false on a null String constructor parameter. * java/net/natPlainSocketImpl.cc: Remove unneccessary sprintf calls for exception messages. BooleanClass: declare. (setOption): Use BooleanClass instead of Class.forName() for instanceof test. (bind): Cast 4th parameter of setsockopt to char *' for compatibility with older Solaris headers. * java/net/natPlainDatagramSocketImpl.cc: Remove unneccessary sprintf calls for exception messages. BooleanClass, IntegerClass: declare. (setOption): Use BooleanClass and IntegerClass, not Class.forName() for instanceof test. From-SVN: r30988
This commit is contained in:
parent
fe2e294c7e
commit
5ac99d9adc
4 changed files with 47 additions and 61 deletions
|
@ -39,7 +39,7 @@ public final class Boolean extends Object implements Serializable
|
|||
|
||||
public Boolean(String strVal)
|
||||
{
|
||||
value = strVal.equalsIgnoreCase("true");
|
||||
value = (strVal == null ? false : strVal.equalsIgnoreCase("true"));
|
||||
}
|
||||
|
||||
public boolean booleanValue()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue