RFR: 8307887: (fs) Files.createSymbolicLink throws less specific exception when in developer mode and file already exists [v2]

Brian Burkhalter bpb at openjdk.org
Mon Jun 5 18:19:50 UTC 2023


On Mon, 5 Jun 2023 15:43:47 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> test/jdk/java/nio/file/Files/Links.java line 63:
>> 
>>> 61:             Files.deleteIfExists(pathTarget);
>>> 62:         }
>>> 63: 
>> 
>> I think it's confusing to have a test for sym links before testing if sym links are supported. I think it's okay to not include tests that target very specific cases like Windows "developer mode" but a test that the optional specific exception is thrown is okay, it just feels like it should be just one of the tests, rather than done before knowing the test can run, e.g. try this on a non-NTFS system and I assume createSymbolicLink will fail and cause the test to fail.
>
> Logically I don't like the ordering either but without this happening first the error was not reproduced on the pre-PR code.

Perhaps it would be better to revert the test change altogether and label the issue `noreg-hard`?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14255#discussion_r1218429494


More information about the nio-dev mailing list