aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/Boolean.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/lang/Boolean.java')
-rw-r--r--libjava/java/lang/Boolean.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/libjava/java/lang/Boolean.java b/libjava/java/lang/Boolean.java
index 78ab77f..060f126 100644
--- a/libjava/java/lang/Boolean.java
+++ b/libjava/java/lang/Boolean.java
@@ -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;
}
}