Merge
authoralanb
Sat, 02 Oct 2010 12:59:52 +0100
changeset 6694 342ae2e24cf0
parent 6693 f897a08d4dae (diff)
parent 6692 aef4e294026f (current diff)
child 6695 0e91810597f9
Merge
--- a/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java	Fri Oct 01 14:36:01 2010 -0400
+++ b/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java	Sat Oct 02 12:59:52 2010 +0100
@@ -156,9 +156,4 @@
             return supportsFileAttributeView(UserDefinedFileAttributeView.class);
         return super.supportsFileAttributeView(name);
     }
-
-    @Override
-    boolean isLoopback() {
-        return false;
-    }
 }
--- a/jdk/src/solaris/classes/sun/nio/fs/SolarisFileStore.java	Fri Oct 01 14:36:01 2010 -0400
+++ b/jdk/src/solaris/classes/sun/nio/fs/SolarisFileStore.java	Sat Oct 02 12:59:52 2010 +0100
@@ -108,9 +108,4 @@
             return supportsFileAttributeView(UserDefinedFileAttributeView.class);
         return super.supportsFileAttributeView(name);
     }
-
-    @Override
-    boolean isLoopback() {
-        return type().equals("lofs");
-    }
 }
--- a/jdk/src/solaris/classes/sun/nio/fs/UnixFileStore.java	Fri Oct 01 14:36:01 2010 -0400
+++ b/jdk/src/solaris/classes/sun/nio/fs/UnixFileStore.java	Sat Oct 02 12:59:52 2010 +0100
@@ -76,12 +76,6 @@
      */
     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 @@
         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
--- a/jdk/test/java/nio/file/FileStore/Basic.java	Fri Oct 01 14:36:01 2010 -0400
+++ b/jdk/test/java/nio/file/FileStore/Basic.java	Sat Oct 02 12:59:52 2010 +0100
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4313887 6873621
+ * @bug 4313887 6873621 6979526
  * @summary Unit test for java.nio.file.FileStore
  * @library ..
  */