diff -r d382dacfd73f -r af4001c85438 rt/emul/mini/src/main/java/java/lang/Boolean.java --- a/rt/emul/mini/src/main/java/java/lang/Boolean.java Tue Feb 26 16:54:16 2013 +0100 +++ b/rt/emul/mini/src/main/java/java/lang/Boolean.java Thu Feb 28 10:39:40 2013 +0100 @@ -25,6 +25,8 @@ package java.lang; +import org.apidesign.bck2brwsr.core.JavaScriptBody; + /** * The Boolean class wraps a value of the primitive type * {@code boolean} in an object. An object of type @@ -279,4 +281,13 @@ private static boolean toBoolean(String name) { return ((name != null) && name.equalsIgnoreCase("true")); } + static { + // as last step of initialization, initialize valueOf method + initValueOf(); + } + @JavaScriptBody(args = { }, body = + "vm.java_lang_Boolean(false)" + + ".valueOf = function() { return this._value(); };" + ) + private native static void initValueOf(); }