Subj : Rhino: !(java.lang.Boolean.FALSE) != !false To : netscape.public.mozilla.jseng From : Attila Szegedi Date : Thu Oct 28 2004 05:58 pm Hi folks, Here's a shell session I just run: C:\projects\mozilla\mozilla\js\rhino\build\rhino1_6R1pre>java -jar js.jar Rhino 1.6 release 1_pre_RC3 2004 10 27 js> java.lang.Boolean.FALSE == false false js> Now, I understand that this slightly unintuitive result is due to the fact that the expresisons gets evaluated (if I interpreted correctly) according to the point 19 of "The Abstract Equality Comparison Algorithm" (ECMA-262 section 11.9.3). However, I even attempted forcing the boolean comparison, as hinted on page 56 of ECMA-262: js> !java.lang.Boolean.FALSE == !false false then, thinking maybe associativity is the problem: js> !(java.lang.Boolean.FALSE) == !false false Now, I'd expect at least this last expression to work, since NativeJavaObject.defaultValue(ScriptRuntime.BooleanClass) ought to correctly convert it into a boolean. Am I overlooking something? TIA, Attila. .