On Mon, 29 Sep 2025 08:28:38 GMT, Francesco Andreuzzi <[email protected]> wrote:
> The test checks whether writing to a read-only directory throws a > `IOException`. This test is not applicable when the user running the test is > root. Thus, I propose to skip it. > > I converted the class to several JUnit tests, so we can use `@DisabledIf`. test/jdk/java/io/File/createTempFile/TargetDirectory.java line 50: > 48: import jdk.test.lib.Platform; > 49: > 50: import static org.junit.jupiter.api.Assertions.*; I think you can dispense with the wild card at line 50 by doing: import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27542#discussion_r2415245878
