gnodet-bot commented on code in PR #2280:
URL: https://github.com/apache/maven-resolver/pull/2280#discussion_r4506694258


##########
maven-resolver-test-util/src/main/java/org/eclipse/aether/internal/test/util/TestFileUtils.java:
##########
@@ -208,6 +231,15 @@ public static byte[] readBytes(File file) throws 
IOException {
         }
     }
 
+    /**
+     * Writes a byte pattern to a file the given number of times.
+     *
+     * @param file the file to write
+     * @param pattern the bytes to repeat
+     * @param repeat how many times the pattern is written
+     * @throws IOException if an I/O error occurs
+     * @deprecated use {@code Files.write(Path, byte[])} instead

Review Comment:
   💬 **Javadoc precision nit:** `{@code Files.write(Path, byte[])}` is not a 
direct replacement for `writeBytes(file, pattern, repeat)` when `repeat > 1` — 
`Files.write` writes the byte array once, not `repeat` times.
   
   Consider:
   
   ```suggestion
        * @deprecated use the JUnit 5 {@code @TempDir} extension instead; for 
file content, use
        * {@code Files.write(Path, byte[])} (repeat = 1) or build the repeated 
bytes manually.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to