aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/java/org/aspectj/systemtest/ajc154
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/ajc154
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/ajc154')
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc154/CustomMungerExtensionTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc154/CustomMungerExtensionTest.java b/tests/src/test/java/org/aspectj/systemtest/ajc154/CustomMungerExtensionTest.java
index 7c0d26d4c..6b1b8821c 100644
--- a/tests/src/test/java/org/aspectj/systemtest/ajc154/CustomMungerExtensionTest.java
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc154/CustomMungerExtensionTest.java
@@ -58,13 +58,13 @@ public class CustomMungerExtensionTest extends AjdeInteractionTestbed {
CustomMungerFactory factory = (CustomMungerFactory) compiler.getCustomMungerFactory();
assertTrue(factory.getAllCreatedCustomShadowMungers().size() > 0);
- for (Iterator<ShadowMunger> i = factory.getAllCreatedCustomShadowMungers().iterator(); i.hasNext();) {
- assertTrue(((DumbShadowMunger) i.next()).called);
+ for (ShadowMunger shadowMunger : factory.getAllCreatedCustomShadowMungers()) {
+ assertTrue(((DumbShadowMunger) shadowMunger).called);
}
assertTrue(factory.getAllCreatedCustomTypeMungers().size() > 0);
- for (Iterator<ConcreteTypeMunger> i = factory.getAllCreatedCustomTypeMungers().iterator(); i.hasNext();) {
- assertTrue(((DumbTypeMunger) i.next()).called);
+ for (ConcreteTypeMunger concreteTypeMunger : factory.getAllCreatedCustomTypeMungers()) {
+ assertTrue(((DumbTypeMunger) concreteTypeMunger).called);
}
}