[MNG-6847] Use diamond operator (#288)

* [MNG-6847] Use diamond operator

Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.staticanalysis.UseDiamondOperator?organizationId=QXBhY2hlIE1hdmVu

Co-authored-by: Moderne <team@moderne.io>

* Restore core-it-suite/src/test/resources/mng-5581-lifecycle-mapping-delegate/extension/src/main/java/org/apache/maven/its/mng5581/lifecyclemappingdelegate/TestLifecycleMappingDelegate.java

---------

Co-authored-by: Moderne <team@moderne.io>
This commit is contained in:
Tim te Beek 2023-08-29 12:50:44 +01:00 committed by GitHub
parent 6326854fcb
commit 433611003b
9 changed files with 11 additions and 11 deletions

View File

@ -60,7 +60,7 @@ public class MavenITmng0768OfflineModeTest extends AbstractMavenIntegrationTestC
public void testitMNG768() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-0768");
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<String>());
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<>());
Handler repoHandler = new AbstractHandler() {
public void handle(

View File

@ -60,7 +60,7 @@ public class MavenITmng4348NoUnnecessaryRepositoryAccessTest extends AbstractMav
Verifier verifier = newVerifier(testDir.getAbsolutePath());
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<String>());
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<>());
Handler repoHandler = new AbstractHandler() {
@Override

View File

@ -62,7 +62,7 @@ public class MavenITmng4500NoUpdateOfTimestampedSnapshotsTest extends AbstractMa
String pomUri = "/repo/org/apache/maven/its/mng4500/dep/0.1-SNAPSHOT/dep-0.1-20091219.230823-1.pom";
String jarUri = "/repo/org/apache/maven/its/mng4500/dep/0.1-SNAPSHOT/dep-0.1-20091219.230823-1.jar";
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<String>());
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<>());
AbstractHandler logHandler = new AbstractHandler() {
@Override

View File

@ -63,7 +63,7 @@ public class MavenITmng4554PluginPrefixMappingUpdateTest extends AbstractMavenIn
String metadataUri = "/repo-1/org/apache/maven/its/mng4554/maven-metadata.xml";
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<String>());
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<>());
AbstractHandler logHandler = new AbstractHandler() {
@Override
@ -142,7 +142,7 @@ public class MavenITmng4554PluginPrefixMappingUpdateTest extends AbstractMavenIn
String metadataUri = "/repo-1/org/apache/maven/its/mng4554/maven-metadata.xml";
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<String>());
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<>());
AbstractHandler logHandler = new AbstractHandler() {
@Override
@ -224,7 +224,7 @@ public class MavenITmng4554PluginPrefixMappingUpdateTest extends AbstractMavenIn
String metadataUri = "/repo-it/org/apache/maven/its/mng4554/maven-metadata.xml";
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<String>());
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<>());
AbstractHandler logHandler = new AbstractHandler() {
@Override

View File

@ -59,7 +59,7 @@ public class MavenITmng4772PluginVersionResolutionDoesntTouchDisabledRepoTest ex
public void testit() throws Exception {
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-4772");
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<String>());
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<>());
AbstractHandler logHandler = new AbstractHandler() {
@Override

View File

@ -61,7 +61,7 @@ public class MavenITmng5064SuppressSnapshotUpdatesTest extends AbstractMavenInte
String metadataUri = "org/apache/maven/its/mng5064/dep/0.1-SNAPSHOT/maven-metadata.xml";
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<String>());
final List<String> requestedUris = Collections.synchronizedList(new ArrayList<>());
AbstractHandler logHandler = new AbstractHandler() {
@Override

View File

@ -84,7 +84,7 @@ public class MavenITmng6057CheckReactorOrderTest extends AbstractMavenIntegratio
* </pre>
*/
private List<String> extractReactorBuildOrder(List<String> loadedLines) {
List<String> resultingLines = new LinkedList<String>();
List<String> resultingLines = new LinkedList<>();
boolean start = false;
for (String line : loadedLines) {
if (start) {

View File

@ -144,7 +144,7 @@ public class MavenITmng6391PrintVersionTest extends AbstractMavenIntegrationTest
* </pre>
*/
private List<String> extractReactorBuildOrder(List<String> loadedLines) {
List<String> resultingLines = new LinkedList<String>();
List<String> resultingLines = new LinkedList<>();
boolean start = false;
for (String line : loadedLines) {
if (start) {

View File

@ -27,6 +27,6 @@ import java.util.List;
*/
public class App {
public static void main(String[] args) {
List<String> stuff = new ArrayList<String>();
List<String> stuff = new ArrayList<>();
}
}