I haven't tried your example, but most autoboxing is cached so it is unusual that a new Boolean is allocated. You are usually safe to compare Booleans directly. You could perhaps be the person who logs the bug, in my experience the folks at Sun are pretty responsive re. bugs of this nature.
On Feb 5, 7:04 am, "John Cowan" <[EMAIL PROTECTED]> wrote: > Could someone consider filing a bug against Java asking that > Method#invoke return either Boolean.TRUE or Boolean.FALSE when calling > a boolean method, rather than boxing the return value into a freshly > allocated java.lang.Boolean? That would make life much simpler for > those of us who need to translate these boxed Booleans to our own > language's true and false values: an identity comparison rather than a > cast followed by a booleanValue() would suffice. > > This wouldn't help with methods that return a Boolean rather than a > boolean, but there are few of those. > > Thanks. > > -- > GMail doesn't have rotating .sigs, but you can see mine > athttp://www.ccil.org/~cowan/signatures --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
