Subj : Re: Rhino: !(java.lang.Boolean.FALSE) != !false To : netscape.public.mozilla.jseng From : Attila Szegedi Date : Fri Oct 29 2004 01:32 pm On Fri, 29 Oct 2004 11:14:16 +0200, Igor Bukanov wrote: >> 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). > > The section 19: > > 19. If Type(y) is Boolean, return the result of the comparison > x == ToNumber(y). > > Now Rhino does not define any special conversion from java.lang.Boolean > to JS number so to fix this you can file an enhancement report at > bugzilla.mozilla.org. > No need to - further investigation showed that cx.getWrapFactory().setJavaPrimitiveWrap(true) solves it nicely. Attila. .