diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/src/main/java/org/aspectj/util/LangUtil.java | 3 | ||||
-rw-r--r-- | util/src/test/java/org/aspectj/util/FileUtilTest.java | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/util/src/main/java/org/aspectj/util/LangUtil.java b/util/src/main/java/org/aspectj/util/LangUtil.java index 98f53e3c8..e97438b0e 100644 --- a/util/src/main/java/org/aspectj/util/LangUtil.java +++ b/util/src/main/java/org/aspectj/util/LangUtil.java @@ -1000,8 +1000,7 @@ public class LangUtil { if ((null == array) || (1 > array.length)) { return Collections.emptyList(); } - ArrayList<T> list = new ArrayList<>(); - list.addAll(Arrays.asList(array)); + ArrayList<T> list = new ArrayList<>(Arrays.asList(array)); return list; } diff --git a/util/src/test/java/org/aspectj/util/FileUtilTest.java b/util/src/test/java/org/aspectj/util/FileUtilTest.java index 7936914fb..f5466e2cf 100644 --- a/util/src/test/java/org/aspectj/util/FileUtilTest.java +++ b/util/src/test/java/org/aspectj/util/FileUtilTest.java @@ -508,8 +508,7 @@ public class FileUtilTest extends TestCase { errors.add(error); } }; - List<String> sourceList = new ArrayList<>(); - sourceList.addAll(Arrays.asList(sources)); + List<String> sourceList = new ArrayList<>(Arrays.asList(sources)); sourceList = Collections.unmodifiableList(sourceList); for (int k = 0; k < sources.length; k++) { List<String> result = FileUtil.lineSeek("" + k, sourceList, true, errorSink); |