--- a/jdk/src/java.base/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java Thu Dec 10 09:23:49 2015 -0800
+++ b/jdk/src/java.base/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java Thu Dec 10 15:57:27 2015 -0800
@@ -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
@@ -309,7 +309,12 @@
checkAccess(file, true, false);
// open file (will fail if file is a link and not following links)
- int fd = file.openForAttributeAccess(followLinks);
+ int fd = -1;
+ try {
+ fd = file.openForAttributeAccess(followLinks);
+ } catch (UnixException x) {
+ x.rethrowAsIOException(file);
+ }
try {
long address = unsafe.allocateMemory(SIZEOF_ACE_T * MAX_ACL_ENTRIES);
try {
@@ -338,7 +343,12 @@
checkAccess(file, false, true);
// open file (will fail if file is a link and not following links)
- int fd = file.openForAttributeAccess(followLinks);
+ int fd = -1;
+ try {
+ fd = file.openForAttributeAccess(followLinks);
+ } catch (UnixException x) {
+ x.rethrowAsIOException(file);
+ }
try {
// SECURITY: need to copy list as can change during processing
acl = new ArrayList<AclEntry>(acl);