aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/java/org/aspectj/systemtest/ajc161
diff options
context:
space:
mode:
authorLars Grefer <eclipse@larsgrefer.de>2020-08-08 03:06:37 +0200
committerLars Grefer <eclipse@larsgrefer.de>2020-08-08 03:06:37 +0200
commit72194b7982ddfa8e9864d0a9934905bb76b90f33 (patch)
treeebed806c358c1a3960c5d6be4c13b26ca41809df /tests/src/test/java/org/aspectj/systemtest/ajc161
parentc3289ab86bfb2c97cf34147239b3dde46de92a7c (diff)
downloadaspectj-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 'tests/src/test/java/org/aspectj/systemtest/ajc161')
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc161/Ajc161Tests.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc161/Ajc161Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc161/Ajc161Tests.java
index bcf640f3f..bba565a3a 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc161/Ajc161Tests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc161/Ajc161Tests.java
@@ -141,8 +141,8 @@ public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
Set entries = irm.getEntries();
boolean gotSomethingValid = false;
String expected = "<recursivepackage{RecursiveCatcher.java'RecursiveCatcher~recursiveCall~I?method-call(void recursivepackage.RecursiveCatcher.recursiveCall(int))";
- for (Iterator iterator = entries.iterator(); iterator.hasNext();) {
- String str = (String) iterator.next();
+ for (Object entry : entries) {
+ String str = (String) entry;
if (str.indexOf(expected) != -1) {
gotSomethingValid = true;
}