RFR: 8308678: (fs) UnixPath::toRealPath needs additional permissions when running with SM (macOS)
Lance Andersen
lancea at openjdk.org
Thu May 25 20:29:55 UTC 2023
On Thu, 25 May 2023 20:17:59 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> test/jdk/java/nio/file/Path/MacToRealPathWithSM.java line 63:
>>
>>> 61: System.out.printf("real path no follow: %s%n",
>>> 62: path.toRealPath(LinkOption.NOFOLLOW_LINKS));
>>> 63: }
>>
>> Same comment regarding printf
>>
>> Are you expecting an Exception to be thrown if there is an issue given there is no validation? Either way, I would clarify with additional comments for future maintainers
>
> An `AccessControlException` is thrown by `path.toRealPath(LinkOption.NOFOLLOW_LINKS)` when run against JDK 20 and the current mainline. I concur that more comments would be better.
So here is a wild idea, perhaps consider converting this to a junit test given it is a new test and we can start to leverage some of the value brought by the junit framework.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14157#discussion_r1205973910
More information about the nio-dev
mailing list