You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "laeubi (via GitHub)" <gi...@apache.org> on 2023/02/22 15:22:35 UTC

[GitHub] [maven-resolver] laeubi commented on a diff in pull request #251: IO Fixes

laeubi commented on code in PR #251:
URL: https://github.com/apache/maven-resolver/pull/251#discussion_r1114500030


##########
maven-resolver-util/src/main/java/org/eclipse/aether/util/FileUtils.java:
##########
@@ -103,9 +105,14 @@ public Path getPath() {
                 return tempFile;
             }
 
+            @SuppressWarnings("checkstyle:magicnumber")
             @Override
             public void move() throws IOException {
-                Files.move(tempFile, file, StandardCopyOption.ATOMIC_MOVE);
+                retry(
+                        3,
+                        50,
+                        () -> Files.move(tempFile, file, StandardCopyOption.ATOMIC_MOVE),

Review Comment:
   should this then not be handled on a higher level?
   e.g. in this case one might start all over again (read the current file contents, set new properties, write gain...)



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org