RFR: 8298187: (fs) BsdFileAttributeViews::setTimes does not support lastAccessTime on HFS+ [v4]

Alan Bateman alanb at openjdk.org
Tue Dec 13 10:15:27 UTC 2022


On Mon, 12 Dec 2022 22:30:36 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> If the path is on an HFS store, use the generic Unix implementation of `java.nio.file.attribute.BasicFileAttributeView::setTimes`to set the last access time.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8298187: Fix a comment

Updated version looks quite good, just a few minor nits.

src/java.base/macosx/classes/sun/nio/fs/BsdFileAttributeViews.java line 57:

> 55:                 fd = path.openForAttributeAccess(followLinks);
> 56:             } catch (UnixException x) {
> 57:                 x.rethrowAsIOException(path);

The try-open-catch shouldn't be nested in the other try-catch. If the open fails then the fd isn't closed and there is no suppressed exception.

src/java.base/macosx/classes/sun/nio/fs/BsdNativeDispatcher.java line 98:

> 96:         } finally {
> 97:             Blocker.end(comp);
> 98:             }

Can you check the formatting here, the end brace seems to be in pushed out.

-------------

PR: https://git.openjdk.org/jdk/pull/11600


More information about the nio-dev mailing list