8130274: java/nio/file/FileStore/Basic.java fails when two successive stores in an iteration are determined to be equal
Summary: Make UnixFileStore.equals() also compare the return values of name(), the names of the mounted filesystems.
Reviewed-by: alanb
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java Fri Jul 31 07:04:48 2015 -0700
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java Fri Jul 31 07:12:36 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -186,7 +186,8 @@
return false;
UnixFileStore other = (UnixFileStore)ob;
return (this.dev == other.dev) &&
- Arrays.equals(this.entry.dir(), other.entry.dir());
+ Arrays.equals(this.entry.dir(), other.entry.dir()) &&
+ this.entry.name().equals(other.entry.name());
}
@Override