changeset 13501:613eee8ca9bf

8157287: java/nio/file/FileStore/Basic.java failed with "java.nio.file.AccessDeniedException : /zones/zoneone/root " Summary: Ignore AccessDeniedException when testing space attributes. Reviewed-by: alanb
author bpb
date Fri, 08 Jul 2016 16:16:45 -0700
parents 708b820b474e
children 64f676f55401
files test/java/nio/file/FileStore/Basic.java
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/nio/file/FileStore/Basic.java	Fri Jul 31 07:15:59 2015 -0700
+++ b/test/java/nio/file/FileStore/Basic.java	Fri Jul 08 16:16:45 2016 -0700
@@ -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
@@ -123,6 +123,12 @@
                 // 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