RFR: 8326897: (fs) The utility TestUtil.supportsLinks is wrongly used to check for hard link support
Guoxiong Li
gli at openjdk.org
Wed Feb 28 06:37:53 UTC 2024
On Wed, 28 Feb 2024 03:12:17 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Add to `test/jdk/java/nio/file/TestUtil.java` the method `TestUtil.supportsHardLinks` and use it to conditionally test `Files.createLink` where appropriate in the `java/nio/file` tests.
Look goods.
A possible problem is the unmatched method names. Generally, the method `Files.createSymbolicLink` may match `TestUtil.supportsSymbolicLinks` instead of `TestUtil.supportsLinks`. And the `Files.createLink` may match `TestUtil.supportsLinks` or `TestUtil.supportsHardLinks`. But they are just test code, so I think the current patch is OK.
-------------
Marked as reviewed by gli (Committer).
PR Review: https://git.openjdk.org/jdk/pull/18038#pullrequestreview-1905421335
More information about the nio-dev
mailing list