diff options
author | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-08 03:06:37 +0200 |
---|---|---|
committer | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-08 03:06:37 +0200 |
commit | 72194b7982ddfa8e9864d0a9934905bb76b90f33 (patch) | |
tree | ebed806c358c1a3960c5d6be4c13b26ca41809df /ajde.core/src/main | |
parent | c3289ab86bfb2c97cf34147239b3dde46de92a7c (diff) | |
download | aspectj-72194b7982ddfa8e9864d0a9934905bb76b90f33.tar.gz aspectj-72194b7982ddfa8e9864d0a9934905bb76b90f33.zip |
'for' loop replaceable with enhanced 'for' loop
Reports for loops which iterate over collections or arrays, and can be replaced with an enhanced for loop (i.e. the foreach iteration syntax).
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Diffstat (limited to 'ajde.core/src/main')
-rw-r--r-- | ajde.core/src/main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java | 8 |
1 files changed, 4 insertions, 4 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 08d3ee377..a83ab5be2 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 @@ -250,11 +250,11 @@ public class AjdeCoreBuildManager { args = new String[l.size() + xmlfiles.size() + 1]; // TODO speedup int p = 0; - for (int i = 0; i < l.size(); i++) { - args[p++] = l.get(i); + for (String s : l) { + args[p++] = s; } - for (int i = 0; i < xmlfiles.size(); i++) { - args[p++] = xmlfiles.get(i); + for (String xmlfile : xmlfiles) { + args[p++] = xmlfile; } args[p++] = "-xmlConfigured"; } else { |