changeset 8944:9619ed773fbd

8130274, PR3162: 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 Wed, 26 Oct 2016 18:39:48 +0100
parents b163e8d8f24b
children 25dc08f3724e
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	Mon Oct 24 09:58:47 2011 -0700
+++ b/src/solaris/classes/sun/nio/fs/UnixFileStore.java	Wed Oct 26 18:39:48 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, 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