aboutsummaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'bridge')
-rw-r--r--bridge/src/main/java/org/aspectj/bridge/MessageUtil.java4
-rw-r--r--bridge/src/test/java/org/aspectj/bridge/MessageTest.java24
2 files changed, 14 insertions, 14 deletions
diff --git a/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java b/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java
index 6d85ea6f9..0393a5a58 100644
--- a/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java
+++ b/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java
@@ -1101,8 +1101,8 @@ public class MessageUtil {
return true;
}
boolean result = true;
- for (int i = 0; i < sources.length; i++) {
- if (!sink.handleMessage(sources[i])) {
+ for (IMessage source : sources) {
+ if (!sink.handleMessage(source)) {
if (fastFail) {
return false;
}
diff --git a/bridge/src/test/java/org/aspectj/bridge/MessageTest.java b/bridge/src/test/java/org/aspectj/bridge/MessageTest.java
index be30c48ba..d3bd73be6 100644
--- a/bridge/src/test/java/org/aspectj/bridge/MessageTest.java
+++ b/bridge/src/test/java/org/aspectj/bridge/MessageTest.java
@@ -74,18 +74,18 @@ public class MessageTest extends TestCase {
public void testKind_isSameOrLessThan() {
IMessage.Kind last;
IMessage.Kind next = null;
- for (Iterator<IMessage.Kind> iter = IMessage.KINDS.iterator(); iter.hasNext();) {
- last = next;
- next = iter.next();
- if (null == last) {
- continue;
- }
- String label = "last: " + last + " next: " + next;
- assertTrue(label, !next.isSameOrLessThan(null));
- assertTrue(label, !next.isSameOrLessThan(last));
- assertTrue(label, last.isSameOrLessThan(next));
- assertTrue(label, next.isSameOrLessThan(next));
- }
+ for (IMessage.Kind kind : IMessage.KINDS) {
+ last = next;
+ next = kind;
+ if (null == last) {
+ continue;
+ }
+ String label = "last: " + last + " next: " + next;
+ assertTrue(label, !next.isSameOrLessThan(null));
+ assertTrue(label, !next.isSameOrLessThan(last));
+ assertTrue(label, last.isSameOrLessThan(next));
+ assertTrue(label, next.isSameOrLessThan(next));
+ }
}
public void testMessageHandler() {