提交 2fd3b751 编写于 作者: A alanb

7020517: (fs) FileStore.equals returns true if both volumes have the same serial number

Reviewed-by: chegar
上级 f29071a2
......@@ -201,13 +201,12 @@ class WindowsFileStore
if (!(ob instanceof WindowsFileStore))
return false;
WindowsFileStore other = (WindowsFileStore)ob;
return this.volInfo.volumeSerialNumber() == other.volInfo.volumeSerialNumber();
return root.equals(other.root);
}
@Override
public int hashCode() {
// reveals VSN without permission check - okay?
return volInfo.volumeSerialNumber();
return root.hashCode();
}
@Override
......
......@@ -22,7 +22,7 @@
*/
/* @test
* @bug 4313887 6873621 6979526 7006126
* @bug 4313887 6873621 6979526 7006126 7020517
* @summary Unit test for java.nio.file.FileStore
* @library ..
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册