elharo commented on code in PR #84:
URL: https://github.com/apache/maven-clean-plugin/pull/84#discussion_r1938509694


##########
src/main/java/org/apache/maven/plugins/clean/Cleaner.java:
##########
@@ -291,13 +291,19 @@ private boolean isSymbolicLink(Path path) throws 
IOException {
                 || (attrs.isDirectory() && attrs.isOther());
     }
 
+    /**
+     * Deletes the specified file or directory. If the path denotes a symlink, 
only the link is removed. Its target is.

Review Comment:
   no period at end of this line



##########
src/main/java/org/apache/maven/plugins/clean/Cleaner.java:
##########
@@ -309,24 +315,23 @@ private int delete(Path file, boolean failOnError, 
boolean retryOnError) throws
                 for (int delay : delays) {
                     try {
                         Thread.sleep(delay);
-                    } catch (InterruptedException e2) {
-                        exception.addSuppressed(e2);
+                    } catch (InterruptedException e) {
+                        Thread.currentThread().interrupt();

Review Comment:
   I'm  not sure that's what that says. It suggests resetting the interrupted 
flag if you don;t handle the exception, but here it's handled by throwing an 
IOException.
   
   And now that I look at this, is that even right? We're sleeping between 
retries, the sleep is interrupted, so we cancel all the retries and throw an 
IOException instead of returning. I guess that makes sense, but at this point 
the interrupt has been handled so it doesn't seem like the current thread 
should still have its interrupt flag set. 



-- 
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-unsubscr...@maven.apache.org

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

Reply via email to