diff options
Diffstat (limited to 'ajde.core/src')
-rw-r--r-- | ajde.core/src/main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java | 7 | ||||
-rw-r--r-- | ajde.core/src/test/java/org/aspectj/ajde/core/tests/ShowWeaveMessagesTest.java | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/ajde.core/src/main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java b/ajde.core/src/main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java index 49948db46..e9f3a1b86 100644 --- a/ajde.core/src/main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java +++ b/ajde.core/src/main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java @@ -225,8 +225,7 @@ public class AjdeCoreBuildManager { if (projectSourceFiles == null) { return null; } - List<String> l = new ArrayList<>(); - l.addAll(projectSourceFiles); + List<String> l = new ArrayList<>(projectSourceFiles); // If the processor options are specified build the command line options for the JDT compiler to see String processor = compilerConfig.getProcessor(); if (processor != null && processor.length() != 0) { @@ -256,7 +255,7 @@ public class AjdeCoreBuildManager { } args[p++] = "-xmlConfigured"; } else { - args = l.toArray(new String[l.size()]); + args = l.toArray(new String[0]); } } @@ -279,7 +278,7 @@ public class AjdeCoreBuildManager { } } if (0 < toAdd.size()) { - ArrayList<String> both = new ArrayList<>(configClasspath.size() + toAdd.size()); + List<String> both = new ArrayList<>(configClasspath.size() + toAdd.size()); both.addAll(configClasspath); both.addAll(toAdd); config.setClasspath(both); diff --git a/ajde.core/src/test/java/org/aspectj/ajde/core/tests/ShowWeaveMessagesTest.java b/ajde.core/src/test/java/org/aspectj/ajde/core/tests/ShowWeaveMessagesTest.java index ed2e097d9..1c8aa7108 100644 --- a/ajde.core/src/test/java/org/aspectj/ajde/core/tests/ShowWeaveMessagesTest.java +++ b/ajde.core/src/test/java/org/aspectj/ajde/core/tests/ShowWeaveMessagesTest.java @@ -366,8 +366,7 @@ public class ShowWeaveMessagesTest extends AjdeCoreTestCase { String line = null; while ((line = fr.readLine()) != null) fileContents.add(line); - List<String> originalFileContents = new ArrayList<>(); - originalFileContents.addAll(fileContents); + List<String> originalFileContents = new ArrayList<>(fileContents); // See if the messages match int msgCount = 0; |