desruisseaux commented on code in PR #328:
URL: 
https://github.com/apache/maven-clean-plugin/pull/328#discussion_r3702598102


##########
src/main/java/org/apache/maven/plugins/clean/Cleaner.java:
##########
@@ -307,20 +328,28 @@ private boolean isClearAll() {
 
     /**
      * Deletes the specified directory and its contents in a background thread.
-     * The default implementation returns {@code false}.
+     * If a {@link BackgroundCleaner} has been {@linkplain 
#setBackgroundCleaner set},
+     * delegates to it with this cleaner's {@link #force} and {@link 
#retryOnError} values.
+     * Otherwise returns {@code false}.
      *
      * @param basedir the directory to delete, must not be {@code null}
      * @return whether this method was able to register the background task
      * @throws IOException if an error occurred while preparing the task 
before execution in a background thread
      */
     boolean fastDelete(Path baseDir) throws IOException {
+        if (backgroundCleaner != null) {
+            return backgroundCleaner.fastDelete(baseDir, force, retryOnError);
+        }
         return false;
     }
 
     /**
      * Returns an error message to show to user if the fast delete failed.
      */
     String fastDeleteError(IOException e) {

Review Comment:
   If `BackgroundCleaner` no longer extent `Cleaner`, can this method be made 
private? If this method is invoked in only one location, should the code be 
moved there?



-- 
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