1.1 --- a/rt/emul/mini/src/main/java/java/lang/Boolean.java Thu Feb 28 10:39:40 2013 +0100
1.2 +++ b/rt/emul/mini/src/main/java/java/lang/Boolean.java Thu May 16 08:49:55 2013 +0200
1.3 @@ -26,6 +26,7 @@
1.4 package java.lang;
1.5
1.6 import org.apidesign.bck2brwsr.core.JavaScriptBody;
1.7 +import org.apidesign.bck2brwsr.core.JavaScriptPrototype;
1.8
1.9 /**
1.10 * The Boolean class wraps a value of the primitive type
1.11 @@ -42,6 +43,7 @@
1.12 * @author Arthur van Hoff
1.13 * @since JDK1.0
1.14 */
1.15 +@JavaScriptPrototype(container = "Boolean.prototype", prototype = "new Boolean")
1.16 public final class Boolean implements java.io.Serializable,
1.17 Comparable<Boolean>
1.18 {
1.19 @@ -129,6 +131,7 @@
1.20 *
1.21 * @return the primitive {@code boolean} value of this object.
1.22 */
1.23 + @JavaScriptBody(args = {}, body = "return this.valueOf();")
1.24 public boolean booleanValue() {
1.25 return value;
1.26 }
1.27 @@ -287,7 +290,7 @@
1.28 }
1.29 @JavaScriptBody(args = { }, body =
1.30 "vm.java_lang_Boolean(false)" +
1.31 - ".valueOf = function() { return this._value(); };"
1.32 + ".valueOf = function() { return this._value() ? true : false; };"
1.33 )
1.34 private native static void initValueOf();
1.35 }