Community
Participate
Working Groups
org.eclipse.core.runtime.Path#hashCode() simply returns ```separators & HASH_MASK```, the first of which doesn't actually contain information on the path segments themselves. Its Javadoc reads "flags indicating separators (has leading, is UNC, has trailing)", and that seems to be the case. It would make sense for the Object hash to represent the path segments in some way, considering that's what the Path is, semantically. Eclipse SDK 4.3.2.M20140221-1700
New Gerrit change created: https://git.eclipse.org/r/46456
The 'separators' field, since renamed to 'flags', contains a hash code as computed in the constructor: private Path(String device, String[] segments, int flags) { // no segment validations are done for performance reasons this.segments = segments; this.device = device; //hash code is cached in all but the bottom four bits of the flags field this.flags = (computeHashCode() << 4) | (flags & ALL_FLAGS); } Closing as INVALID, since the segments are actually used in computing the hash, but it is deceiving!