summaryrefslogtreecommitdiffstats
path: root/bridge/src/org/aspectj
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/src/org/aspectj')
-rw-r--r--bridge/src/org/aspectj/bridge/context/CompilationAndWeavingContext.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/bridge/src/org/aspectj/bridge/context/CompilationAndWeavingContext.java b/bridge/src/org/aspectj/bridge/context/CompilationAndWeavingContext.java
index 208bc696b..f99146864 100644
--- a/bridge/src/org/aspectj/bridge/context/CompilationAndWeavingContext.java
+++ b/bridge/src/org/aspectj/bridge/context/CompilationAndWeavingContext.java
@@ -150,11 +150,11 @@ public class CompilationAndWeavingContext {
explanationStack.push(getFormatter(entry).formatEntry(entry.phaseId,entry.data));
}
StringBuffer sb = new StringBuffer();
- for (Iterator iter = explanationStack.iterator(); iter.hasNext();) {
+ while (!explanationStack.isEmpty()) {
sb.append("when ");
- sb.append(iter.next().toString());
+ sb.append(explanationStack.pop().toString());
sb.append("\n");
- }
+ }
return sb.toString();
}
@@ -215,6 +215,10 @@ public class CompilationAndWeavingContext {
this.phaseId = phase;
this.data = data;
}
+
+ public String toString() {
+ return CompilationAndWeavingContext.getFormatter(this).formatEntry(phaseId, data);
+ }
}
private static class DefaultFormatter implements ContextFormatter {