> I think I've found a bug in java.lang.Boolean
>
> The existing code for the equals method:
>
> public boolean equals(Object obj) {
> return (obj instanceof Boolean && value == ((Boolean)obj).value);
> }
>
> this doesn't check for a null obj
In many places it would just be better to let the NullPointerException
be thrown, but here I'd say that you're right...if the object is null,
then the equality test should fail.
--
Daniel Rall ([EMAIL PROTECTED])
- Bug in java.lang.Boolean John Leuner
- Re: Bug in java.lang.Boolean Daniel L. Rall
- Re: Bug in java.lang.Boolean Paul Fisher
- Re: Bug in java.lang.Boolean Brian Jones
- Re: Bug in java.lang.Boolean John Leuner

