JSR199 FileObjects don't obey general contract of equals.
Jonathan Gibbons
Jonathan.Gibbons at Sun.COM
Wed Jun 20 23:01:50 PDT 2007
On Jun 20, 2007, at 10:49 PM, Peter Ahé wrote:
> On 6/20/07, Jonathan Gibbons <Jonathan.Gibbons at sun.com> wrote:
>> So the proposal is the following
>> - fix ZipFileObject equality to use && not ||
>
> That may fix the hashCode issue, but are you sure "foo" and its
> absolute equivalent will remain equal?
>
That's why I added the 2 bullet in the list -- these were a set to be
taken together,
not alternatives; sorry if that was not clear.
So the proposal is (all of) the following
- fix ZipFileObject equality to use && not ||
- fix ZipFileObject to compare zip files the same way we compare
regular files (whatever we decide that should be)
- consider using absolute paths, and not canonical paths for
FileObject.equals, at a risk of a minor behavioral change
- there is already a method StandardFileManager.IsSameFile; this
should use canonical paths to determine same-ness
> Cheers,
> Peter
More information about the compiler-dev
mailing list