Good catch!  We should make both hashCode & equals consistent.

I think Dir + version is best?

In theory Dir + segFileName should be equally good, since segFileName
<-> version is one-to-one/onto, but I think conceptually version is
the better "identifier" of change.

We really should make getVersion abstract w/ 3.0 -- all core ICs impl it.

Mike

On Wed, Apr 28, 2010 at 8:21 AM, Shai Erera <[email protected]> wrote:
> Hi
>
> According to Java's hashCode jdoc, if two objects answer true to
> o1.equals(o2), then o1.hashCode() == o2.hashCode(). However, IC uses Dir +
> segmentFileName in hashCode() and Dir + version in equals(). More so, the
> jdoc of equals specifies that two IC equals if their Dirs are equals and the
> have the same version.
>
> I think this should be fixed?
>
> But what is the right criteria: Dir + versionĀ  || Dir + segFileName || Dir +
> version + segFileName?
>
> Shai
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to