Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNG-6847] Use diamond operator #288

Merged
merged 2 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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<>();
}
}