From 465af0b962119df2ff9a774f6d6c18cc347fe8bf Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Fri, 8 Jul 2016 16:16:45 -0700 Subject: [PATCH] 8157287: java/nio/file/FileStore/Basic.java failed with "java.nio.file.AccessDeniedException : /zones/zoneone/root " Ignore AccessDeniedException when testing space attributes. Reviewed-by: alanb --- jdk/test/java/nio/file/FileStore/Basic.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jdk/test/java/nio/file/FileStore/Basic.java b/jdk/test/java/nio/file/FileStore/Basic.java index f81d3d95a8b..14479e3cc9b 100644 --- a/jdk/test/java/nio/file/FileStore/Basic.java +++ b/jdk/test/java/nio/file/FileStore/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, 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 @@ -124,6 +124,12 @@ public class Basic { // ignore exception as the store could have been // deleted since the iterator was instantiated System.err.format("%s was not found\n", store); + } catch (AccessDeniedException ade) { + // ignore exception as the lack of ability to access the + // store due to lack of file permission or similar does not + // reflect whether the space attributes would be accessible + // were access to be permitted + System.err.format("%s is inaccessible\n", store); } // two distinct FileStores should not be equal