harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stepan Mishura" <stepan.mish...@gmail.com>
Subject Re: [classlib] [security] equals method that just returns false
Date Mon, 15 Jan 2007 07:28:05 GMT
On 1/13/07, Nathan Beyer wrote:
>
> Assuming the class is actually a Comparator, that's probably fine,
> though it does seem a little weird. A Comparator is supposed to
> implement an equals method to determine if two Comparators are logical
> equal such that given two different instances they would both sort
> something exactly the same way. Perhaps this class is just saying that
> can never be possible.


Yes, it looks like a sub that implies that the class's instances
shouldn't be compared. I'd remove it to inherit the method implementation
from Object class.

Thanks,
Stepan.

-Nathan
>
> On 1/12/07, Sian January <sianjanuary@googlemail.com> wrote:
> > Hello,
> >
> > I have found a class in the security module that overrides the equals
> > methods, but just returns false within that method.  There doesn't seem
> to
> > be any comment about why it does this so I was just wondering if anyone
> had
> > any idea?  The class is
> > org.apache.harmony.security.x501.AttributeTypeAndValueComparator.
> >
> > Thanks,
> >
> > Sian
> >
> > --
> > Sian January
> >
> > IBM Java Technology Centre, UK
> >
> >
>



-- 
Stepan Mishura
Intel Enterprise Solutions Software Division

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message