diff options
author | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-15 16:35:54 +0200 |
---|---|---|
committer | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-15 16:35:54 +0200 |
commit | d66bec041a857bc3076a20dfeb1aa6037b020db1 (patch) | |
tree | ab29bd5c21811b4d3564e549e820bd518ceb2680 /ajdoc | |
parent | efa2e5ce8c9cc2d20ab7479d1caa4a2ae1de6e8a (diff) | |
download | aspectj-d66bec041a857bc3076a20dfeb1aa6037b020db1.tar.gz aspectj-d66bec041a857bc3076a20dfeb1aa6037b020db1.zip |
Manual array copy
Reports the manual copying of array contents which may be replaced by calls to System.arraycopy().
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Diffstat (limited to 'ajdoc')
-rw-r--r-- | ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTestCase.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTestCase.java b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTestCase.java index 6dfd5633f..af95fb3fc 100644 --- a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTestCase.java +++ b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTestCase.java @@ -178,9 +178,7 @@ public abstract class AjdocTestCase extends TestCase { args[3] = AjdocTests.ASPECTJRT_PATH.getPath(); args[4] = "-d"; args[5] = getAbsolutePathOutdir(); - for (int i = 0; i < ajOptions.length; i++) { - args[6 + i] = ajOptions[i]; - } + System.arraycopy(ajOptions, 0, args, 6, ajOptions.length); for (int i = 0; i < inputFiles.length; i++) { args[6 + i + ajOptions.length] = inputFiles[i].getAbsolutePath(); } @@ -252,9 +250,7 @@ public abstract class AjdocTestCase extends TestCase { args[4] = getAbsolutePathOutdir(); args[5] = "-sourcepath"; args[6] = getAbsoluteProjectDir(); - for (int i = 0; i < directoryNames.length; i++) { - args[7 + i] = directoryNames[i]; - } + System.arraycopy(directoryNames, 0, args, 7, directoryNames.length); org.aspectj.tools.ajdoc.Main.main(args); } @@ -272,9 +268,7 @@ public abstract class AjdocTestCase extends TestCase { args[3] = getAbsolutePathOutdir(); args[4] = "-sourcepath"; args[5] = getAbsoluteProjectDir(); - for (int i = 0; i < directoryNames.length; i++) { - args[6 + i] = directoryNames[i]; - } + System.arraycopy(directoryNames, 0, args, 6, directoryNames.length); org.aspectj.tools.ajdoc.Main.main(args); } |