gnodet commented on code in PR #286: URL: https://github.com/apache/maven-clean-plugin/pull/286#discussion_r2564298476
########## src/main/java/org/apache/maven/plugins/clean/BackgroundCleaner.java: ########## @@ -0,0 +1,342 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.maven.plugins.clean; + +import java.io.IOException; +import java.nio.file.DirectoryNotEmptyException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; + +import org.apache.maven.api.Event; +import org.apache.maven.api.EventType; +import org.apache.maven.api.Listener; +import org.apache.maven.api.Session; +import org.apache.maven.api.annotations.Nonnull; +import org.apache.maven.api.plugin.Log; +import org.apache.maven.api.services.PathMatcherFactory; + +/** + * A cleaner potentially executed by background threads. + * + * <h4>Limitations</h4> + * This class can be used for deleting {@link Path} only, not {@link Fileset}, because this class cannot handle + * the case where only a subset of the files should be deleted. It cannot handle following symbolic links neither. + * + * @author Benjamin Bentmann + * @author Martin Desruisseaux + */ +final class BackgroundCleaner extends Cleaner implements Listener, Runnable { Review Comment: Is `final` really needed 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]
