changeset 11034:7d1d5f4d019a

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
author igerasim
date Tue, 15 Sep 2015 18:57:04 +0300
parents 3623f1b29b58
children 5910b94ea083 42d3502d4bfd
files src/solaris/classes/sun/nio/fs/UnixFileStore.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/nio/fs/UnixFileStore.java	Fri Sep 11 16:53:09 2015 +0300
+++ b/src/solaris/classes/sun/nio/fs/UnixFileStore.java	Tue Sep 15 18:57:04 2015 +0300
@@ -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