Skip to content

Commit

Permalink
[MNG-6847] Use diamond operator (#288)
Browse files Browse the repository at this point in the history
* [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>
  • Loading branch information
timtebeek and TeamModerne authored Aug 29, 2023
1 parent 9812872 commit c832179
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public MavenITmng0768OfflineModeTest() {
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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void testit() throws Exception {

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void testit() throws Exception {
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void testitCached() throws Exception {

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
Expand Down Expand Up @@ -142,7 +142,7 @@ public void testitForcedUpdate() throws Exception {

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
Expand Down Expand Up @@ -224,7 +224,7 @@ public void testitRefetched() throws Exception {

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public MavenITmng4772PluginVersionResolutionDoesntTouchDisabledRepoTest() {
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void testit() throws Exception {

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void testitReactorShouldResultInExpectedOrder() throws Exception {
* </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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public void testitShouldPrintVersionInAllLines() throws Exception {
* </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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
*/
public class App {
public static void main(String[] args) {
List<String> stuff = new ArrayList<String>();
List<String> stuff = new ArrayList<>();
}
}

0 comments on commit c832179

Please sign in to comment.