On 4/28/10 8:21 AM, Shai Erera 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
Looks like Dir + version is enough? But perhaps Dir + segFileName is
better - its odd to rely on getVersion for this in the abstract base
class - it can throw UnsupportedOperationException unless a subclass
chooses to implement it.
--
- Mark
http://www.lucidimagination.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]