olamy commented on code in PR #1623:
URL: https://github.com/apache/maven-resolver/pull/1623#discussion_r2423371166
##########
maven-resolver-test-util/src/main/java/org/eclipse/aether/internal/test/util/TestFileProcessor.java:
##########
@@ -63,46 +63,18 @@ public boolean mkdirs(File directory) {
public void write(File file, String data) throws IOException {
mkdirs(file.getParentFile());
- FileOutputStream fos = null;
- try {
- fos = new FileOutputStream(file);
-
+ try (FileOutputStream fos = new FileOutputStream(file)) {
Review Comment:
why not `Files.newInputStream`?
AI is not smart enough here?
--
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]