Re: [vfs] Why doesn't AbstractFileObject override equals?

2008-06-12 Thread Mario Ivankovits
Hi! I'd go that way: 1. in AbstractFileObject.getParent(): replace if (this == fs.getRoot()) { ... }; with FileObject root = fs.getRoot(); if (root instanceof DecoratedFileObject) { root = ((DecoratedFileObject) root).getDecoratedFileObject(); } if (this == root) { ... } But

[vfs] Why doesn't AbstractFileObject override equals?

2008-06-11 Thread Stephan Schuster
hi together, on the first glimpse i don't understand why AbstractFileObject doesn't override equals() and hashCode(). depending on the concrete implementation this may result in Object's identity comparison when comparing two file objects which is in most cases definitely not desired (see

Re: [vfs] Why doesn't AbstractFileObject override equals?

2008-06-11 Thread Mario Ivankovits
Hi! on the first glimpse i don't understand why AbstractFileObject doesn't override equals() and hashCode(). The current VFS implementation (if you do not use anything else then the only-working SoftRefFilesCache) ensures that two resolveFile will return the same object if you ask for the same