diff --git a/src/solaris/classes/sun/nio/fs/LinuxFileStore.java b/src/solaris/classes/sun/nio/fs/LinuxFileStore.java index 1efe13b819910f874f79c042b0fc26eb41b675aa..b8b18f31f0952fc855dc1539854f0f1ab9423ef4 100644 --- a/src/solaris/classes/sun/nio/fs/LinuxFileStore.java +++ b/src/solaris/classes/sun/nio/fs/LinuxFileStore.java @@ -156,9 +156,4 @@ class LinuxFileStore return supportsFileAttributeView(UserDefinedFileAttributeView.class); return super.supportsFileAttributeView(name); } - - @Override - boolean isLoopback() { - return false; - } } diff --git a/src/solaris/classes/sun/nio/fs/SolarisFileStore.java b/src/solaris/classes/sun/nio/fs/SolarisFileStore.java index 1efa99268c6d658f39cc5380655d54ed5517e7c3..efee0d2914b395bc9c51eccafbc8eb7ba1569211 100644 --- a/src/solaris/classes/sun/nio/fs/SolarisFileStore.java +++ b/src/solaris/classes/sun/nio/fs/SolarisFileStore.java @@ -108,9 +108,4 @@ class SolarisFileStore return supportsFileAttributeView(UserDefinedFileAttributeView.class); return super.supportsFileAttributeView(name); } - - @Override - boolean isLoopback() { - return type().equals("lofs"); - } } diff --git a/src/solaris/classes/sun/nio/fs/UnixFileStore.java b/src/solaris/classes/sun/nio/fs/UnixFileStore.java index d1131bc53a932485fa6b38a9b250cde2fe380b86..5ef4cbf64107b371931ba378aa7f419311b25823 100644 --- a/src/solaris/classes/sun/nio/fs/UnixFileStore.java +++ b/src/solaris/classes/sun/nio/fs/UnixFileStore.java @@ -76,12 +76,6 @@ abstract class UnixFileStore */ abstract UnixMountEntry findMountEntry() throws IOException; - /** - * Returns true if this file store represents a loopback file system that - * will have the same device ID as underlying file system. - */ - abstract boolean isLoopback(); - UnixPath file() { return file; } @@ -169,22 +163,13 @@ abstract class UnixFileStore if (!(ob instanceof UnixFileStore)) return false; UnixFileStore other = (UnixFileStore)ob; - if (dev != other.dev) - return false; - // deviceIDs are equal but they may not be equal if one or both of - // them is a loopback file system - boolean thisIsLoopback = isLoopback(); - if (thisIsLoopback != other.isLoopback()) - return false; // one, but not both, are lofs - if (!thisIsLoopback) - return true; // neither is lofs - // both are lofs so compare mount points - return Arrays.equals(this.entry.dir(), other.entry.dir()); + return (this.dev == other.dev) && + Arrays.equals(this.entry.dir(), other.entry.dir()); } @Override public int hashCode() { - return (int)(dev ^ (dev >>> 32)); + return (int)(dev ^ (dev >>> 32)) ^ Arrays.hashCode(entry.dir()); } @Override diff --git a/test/java/nio/file/FileStore/Basic.java b/test/java/nio/file/FileStore/Basic.java index d85563cf3947b93f55711772a68d3e9d063a51a1..9c4a9dbb00bf873b7d1099bf7e5e8aab99a83510 100644 --- a/test/java/nio/file/FileStore/Basic.java +++ b/test/java/nio/file/FileStore/Basic.java @@ -22,7 +22,7 @@ */ /* @test - * @bug 4313887 6873621 + * @bug 4313887 6873621 6979526 * @summary Unit test for java.nio.file.FileStore * @library .. */