From bf9711979c0cc525ebc5034cdc3c2c17876cd679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Wed, 9 Aug 2023 14:53:36 +0300 Subject: [PATCH] Remove redundant type arguments. --- .../m2e/tests/builder/EclipseBuildContextTest.java | 9 +++------ .../EclipseIncrementalBuildContextTest.java | 9 +++------ .../m2e/tests/discovery/MavenDiscoveryTest.java | 14 ++++++-------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/builder/EclipseBuildContextTest.java b/org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/builder/EclipseBuildContextTest.java index 66a68cd0e..745810e90 100644 --- a/org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/builder/EclipseBuildContextTest.java +++ b/org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/builder/EclipseBuildContextTest.java @@ -21,14 +21,11 @@ import java.util.HashMap; import java.util.List; -import org.junit.Test; - -import org.eclipse.core.resources.IProject; - import org.codehaus.plexus.util.Scanner; - +import org.eclipse.core.resources.IProject; import org.eclipse.m2e.core.internal.builder.plexusbuildapi.EclipseBuildContext; import org.eclipse.m2e.tests.common.AbstractMavenProjectTestCase; +import org.junit.Test; public class EclipseBuildContextTest extends AbstractMavenProjectTestCase { @Test @@ -46,7 +43,7 @@ public void testScanner() throws Exception { } private EclipseBuildContext newBuildContext(IProject project) { - return new EclipseBuildContext(project, new HashMap(), new DummyBuildResultCollector()); + return new EclipseBuildContext(project, new HashMap<>(), new DummyBuildResultCollector()); } private void checkScanner(Scanner scanner) { diff --git a/org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/builder/EclipseIncrementalBuildContextTest.java b/org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/builder/EclipseIncrementalBuildContextTest.java index 1ea77c22b..d9f97a268 100644 --- a/org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/builder/EclipseIncrementalBuildContextTest.java +++ b/org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/builder/EclipseIncrementalBuildContextTest.java @@ -20,15 +20,12 @@ import java.util.HashMap; import java.util.List; -import org.junit.Test; - -import org.eclipse.core.resources.IProject; - import org.codehaus.plexus.util.Scanner; - +import org.eclipse.core.resources.IProject; import org.eclipse.m2e.core.internal.builder.plexusbuildapi.EclipseIncrementalBuildContext; import org.eclipse.m2e.tests.common.AbstractMavenProjectTestCase; import org.eclipse.m2e.tests.mocks.ResourceDeltaStub; +import org.junit.Test; public class EclipseIncrementalBuildContextTest extends AbstractMavenProjectTestCase { @@ -58,7 +55,7 @@ public void testScanner() throws Exception { } private EclipseIncrementalBuildContext newBuildContext(ResourceDeltaStub delta) { - return new EclipseIncrementalBuildContext(delta, new HashMap(), new DummyBuildResultCollector()); + return new EclipseIncrementalBuildContext(delta, new HashMap<>(), new DummyBuildResultCollector()); } private void checkResourcesScanner(Scanner scanner) { diff --git a/org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/discovery/MavenDiscoveryTest.java b/org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/discovery/MavenDiscoveryTest.java index cccf4e7ca..1cf4647f0 100644 --- a/org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/discovery/MavenDiscoveryTest.java +++ b/org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/discovery/MavenDiscoveryTest.java @@ -27,10 +27,6 @@ import java.util.Collections; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource; import org.eclipse.equinox.internal.p2.discovery.Catalog; @@ -39,13 +35,15 @@ import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.window.IShellProvider; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.internal.Workbench; - import org.eclipse.m2e.core.project.configurator.MojoExecutionKey; import org.eclipse.m2e.internal.discovery.MavenDiscovery; import org.eclipse.m2e.internal.discovery.wizards.MavenCatalogConfiguration; import org.eclipse.m2e.internal.discovery.wizards.MavenCatalogViewer; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.internal.Workbench; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; public class MavenDiscoveryTest implements IShellProvider { @@ -277,7 +275,7 @@ public Object getId() { item.setId("id"); List configurators = new ArrayList<>(); - MavenDiscovery.getProvidedProjectConfigurators(item, configurators, new ArrayList()); + MavenDiscovery.getProvidedProjectConfigurators(item, configurators, new ArrayList<>()); assertEquals(1, configurators.size()); assertEquals("LifecycleMappingTest.projectConfigurator", configurators.get(0));