Bulk addAll/collection constructor used; other warnings fixed

This commit is contained in:
Tagir Valeev
2018-10-09 10:36:04 +07:00
parent ebd8e1ed09
commit 810ebd29f0
22 changed files with 35 additions and 91 deletions
@@ -85,9 +85,7 @@ public class AnnotationProcessorsPanel extends JPanel {
final ProcessorConfigProfile nodeProfile = ((ProfileNode)node.getParent()).myProfile;
final List<ProcessorConfigProfile> profiles = new ArrayList<>();
profiles.add(myDefaultProfile);
for (ProcessorConfigProfile profile : myModuleProfiles) {
profiles.add(profile);
}
profiles.addAll(myModuleProfiles);
profiles.remove(nodeProfile);
final JBPopup popup = JBPopupFactory.getInstance()
.createPopupChooserBuilder(profiles)
@@ -63,10 +63,7 @@ public final class ModuleCompilerUtil {
@NotNull
private static <Node> List<Chunk<Node>> getSortedChunks(@NotNull Graph<Node> graph) {
final Graph<Chunk<Node>> chunkGraph = toChunkGraph(graph);
final List<Chunk<Node>> chunks = new ArrayList<>(chunkGraph.getNodes().size());
for (final Chunk<Node> chunk : chunkGraph.getNodes()) {
chunks.add(chunk);
}
final List<Chunk<Node>> chunks = new ArrayList<>(chunkGraph.getNodes());
DFSTBuilder<Chunk<Node>> builder = new DFSTBuilder<>(chunkGraph);
if (!builder.isAcyclic()) {
LOG.error("Acyclic graph expected");