From 7fffe8fbd7f1335e5fe35085271c79b026c45d5e Mon Sep 17 00:00:00 2001 From: Davide Angelocola Date: Sun, 6 Sep 2026 08:05:48 +0200 Subject: [PATCH] fix(sonar): use dedicated File assertions (S5838) Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01KW6yskY3pE759XUg2UUtf8 --- .../java/io/github/dfa1/vortex/cli/ImportCommandTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/test/java/io/github/dfa1/vortex/cli/ImportCommandTest.java b/cli/src/test/java/io/github/dfa1/vortex/cli/ImportCommandTest.java index 4151e5f7..bc64672c 100644 --- a/cli/src/test/java/io/github/dfa1/vortex/cli/ImportCommandTest.java +++ b/cli/src/test/java/io/github/dfa1/vortex/cli/ImportCommandTest.java @@ -200,8 +200,8 @@ void ownerCanStillReadAndWriteAfterRestricting(@TempDir Path tmp) throws IOExcep // Then — this is the non-POSIX equivalent of the POSIX branch's `rw-------` // FileAttribute; it must not lock the owner itself out of the file it just created assertThat(result).isEqualTo(file); - assertThat(file.toFile().canRead()).isTrue(); - assertThat(file.toFile().canWrite()).isTrue(); + assertThat(file.toFile()).canRead(); + assertThat(file.toFile()).canWrite(); } } }