Skip to content

Commit

Permalink
[MNG-6847] Use diamond operator
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
timtebeek and TeamModerne committed Aug 19, 2023
1 parent e7f977b commit 50fbaeb
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 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<>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public Map<String, List<MojoExecution>> calculateLifecycleMappings(
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
MojoNotFoundException, InvalidPluginDescriptorException {

Map<String, List<MojoExecution>> pluginExecutions = new LinkedHashMap<String, List<MojoExecution>>();
Map<String, List<MojoExecution>> pluginExecutions = new LinkedHashMap<>();

for (Plugin plugin : project.getBuild().getPlugins()) {
for (PluginExecution execution : plugin.getExecutions()) {
Expand Down

0 comments on commit 50fbaeb

Please sign in to comment.