This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch null in repository https://gitbox.apache.org/repos/asf/maven-install-plugin.git
commit 7b11f05f798dfd3269f85f3757e64eca39287fcf Author: Elliotte Rusty Harold <[email protected]> AuthorDate: Wed Feb 26 08:05:55 2025 -0500 Remove unused branch and argument --- .../java/org/apache/maven/plugins/install/InstallMojoTest.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/test/java/org/apache/maven/plugins/install/InstallMojoTest.java b/src/test/java/org/apache/maven/plugins/install/InstallMojoTest.java index 7e9aa2c..e161bf8 100644 --- a/src/test/java/org/apache/maven/plugins/install/InstallMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/install/InstallMojoTest.java @@ -25,7 +25,6 @@ import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Consumer; import org.apache.maven.api.Artifact; import org.apache.maven.api.MojoExecution; @@ -205,18 +204,11 @@ public class InstallMojoTest { return Collections.emptyList(); } - private <T> ArtifactInstallerRequest execute(Mojo mojo) { - return execute(mojo, null); - } - - private ArtifactInstallerRequest execute(Mojo mojo, Consumer<ArtifactInstallerRequest> consumer) { + private ArtifactInstallerRequest execute(Mojo mojo) { AtomicReference<ArtifactInstallerRequest> request = new AtomicReference<>(); doAnswer(iom -> { ArtifactInstallerRequest req = iom.getArgument(0, ArtifactInstallerRequest.class); request.set(req); - if (consumer != null) { - consumer.accept(req); - } return null; }) .when(artifactInstaller)
