OpenJDK / aarch32-port / jdk9u / jdk
changeset 12493:0df62b08163a
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 | bpb |
---|---|
date | Fri, 31 Jul 2015 07:12:36 -0700 |
parents | 192ea43518d2 |
children | 4050877ddd7b |
files | src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java Fri Jul 31 07:04:48 2015 -0700 +++ b/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