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, so I suggest
public boolean equals(Object obj) {
if(obj == null)
return false;
return (obj instanceof Boolean && value == ((Boolean)obj).value);
}
or something like
public boolean equals(Object obj) {
return ((obj != null) && obj instanceof Boolean && value ==
((Boolean)obj).value);
}
Where should I send bug reports like this, I assume they shouldn't
really be going to the mailing list?
John Leuner