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 #327

Merged
merged 1 commit 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 @@ -418,8 +418,7 @@ public List<RemoteRepository> newResolutionRepositories(
validateSession(session);
validateRepositories(repositories);

repositories = remoteRepositoryManager.aggregateRepositories(
session, new ArrayList<RemoteRepository>(), repositories, true);
repositories = remoteRepositoryManager.aggregateRepositories(session, new ArrayList<>(), repositories, true);
return repositories;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Collection<FileTransformer> getTransformersForArtifact(Artifact artifact)

public void addFileTransformer(String extension, FileTransformer fileTransformer) {
if (!fileTransformers.containsKey(extension)) {
fileTransformers.put(extension, new HashSet<FileTransformer>());
fileTransformers.put(extension, new HashSet<>());
}
fileTransformers.get(extension).add(fileTransformer);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private ArtifactDescription parse(Reader reader) throws IOException {
String name = line.substring(1, line.length() - 1);
name = name.replace("-", "").toUpperCase(Locale.ENGLISH);
state = State.valueOf(name);
sections.put(state, new ArrayList<String>());
sections.put(state, new ArrayList<>());
} catch (IllegalArgumentException e) {
throw new IOException("unknown section: " + line);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public enum ChecksumHeader {

private final AtomicInteger connectionsToClose = new AtomicInteger(0);

private List<LogEntry> logEntries = Collections.synchronizedList(new ArrayList<LogEntry>());
private List<LogEntry> logEntries = Collections.synchronizedList(new ArrayList<>());

public String getHost() {
return "localhost";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ public void acceptTestRange() {
}

private boolean dontAccept(DependencyNode node, String expression) {
return !new PatternExclusionsDependencyFilter(expression).accept(node, new LinkedList<DependencyNode>());
return !new PatternExclusionsDependencyFilter(expression).accept(node, new LinkedList<>());
}

private boolean dontAcceptVersionRange(DependencyNode node, String... expression) {
return !new PatternExclusionsDependencyFilter(new GenericVersionScheme(), expression)
.accept(node, new LinkedList<DependencyNode>());
.accept(node, new LinkedList<>());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ public void acceptTestRange() {
}

public boolean accept(DependencyNode node, String expression) {
return new PatternInclusionsDependencyFilter(expression).accept(node, new LinkedList<DependencyNode>());
return new PatternInclusionsDependencyFilter(expression).accept(node, new LinkedList<>());
}

public boolean acceptVersionRange(DependencyNode node, String... expression) {
return new PatternInclusionsDependencyFilter(new GenericVersionScheme(), expression)
.accept(node, new LinkedList<DependencyNode>());
.accept(node, new LinkedList<>());
}
}