desruisseaux opened a new pull request, #286: URL: https://github.com/apache/maven-clean-plugin/pull/286
Refactor the code of the background thread used in "fast delete" mode: - Move the `FAST_MODE_*` string constants to an enumeration. - Move the code for background execution in a separated `BakgroundCleaner` subclass. - Use `java.util.concurrent.ExecutorService` instead of a thread with our own lifecycle management. - Add explanation about why a directory may be moved twice (same algorithm as before, just explained). - Reduce the number of directory levels by one (no need for a directory which will always contain exactly one directory). - Consolidation of exception handling, including the addition of error reporting at the end. - Add tests. ### Purpose Simplify the `Cleaner` class for the default case (when not using a background thread), have the background code in separated classes, try to make the code slightly safer (`Enum`, `ExecutorService`), prepare for the use of more than one thread in the future if we wish to do so (can be done by configuring the `ExecutorService`). -- 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]
