diff options
author | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-08 03:09:01 +0200 |
---|---|---|
committer | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-08 03:09:01 +0200 |
commit | a508fd5315c6330f2057c219aebc35b15d0ea497 (patch) | |
tree | c0ec3cef4e3411f22e5124ae36eba542a35a495a /ajde.core | |
parent | 72194b7982ddfa8e9864d0a9934905bb76b90f33 (diff) | |
download | aspectj-a508fd5315c6330f2057c219aebc35b15d0ea497.tar.gz aspectj-a508fd5315c6330f2057c219aebc35b15d0ea497.zip |
'while' loop replaceable with enhanced 'for' loop
Reports while loops which iterate over collections, and can be replaced with an enhanced for loop (i.e. foreach iteration syntax).
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Diffstat (limited to 'ajde.core')
-rw-r--r-- | ajde.core/src/main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java | 5 |
1 files changed, 2 insertions, 3 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 a83ab5be2..b64588001 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 @@ -177,9 +177,8 @@ public class AjdeCoreBuildManager { } StringBuffer formattedOptions = new StringBuffer(); - Iterator<?> it = options.iterator(); - while (it.hasNext()) { - String o = it.next().toString(); + for (Object option : options) { + String o = option.toString(); if (formattedOptions.length() > 0) { formattedOptions.append(", "); } |