diff options
author | wisberg <wisberg> | 2003-05-14 05:04:32 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-05-14 05:04:32 +0000 |
commit | 0544260aeabbb24c8757d341894df4f5148c4ebb (patch) | |
tree | 1635863aefc4a0eba6aac22188705b03ddb0db19 /testing | |
parent | 58570a499ae31b5774352910d5927e1ea5245fdb (diff) | |
download | aspectj-0544260aeabbb24c8757d341894df4f5148c4ebb.tar.gz aspectj-0544260aeabbb24c8757d341894df4f5148c4ebb.zip |
- using easier list view of messages
Diffstat (limited to 'testing')
-rw-r--r-- | testing/src/org/aspectj/testing/xml/SoftMessage.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/testing/src/org/aspectj/testing/xml/SoftMessage.java b/testing/src/org/aspectj/testing/xml/SoftMessage.java index 8d8d1722c..d064fa001 100644 --- a/testing/src/org/aspectj/testing/xml/SoftMessage.java +++ b/testing/src/org/aspectj/testing/xml/SoftMessage.java @@ -18,6 +18,7 @@ import java.io.File; import java.util.Iterator; import java.util.List; +import org.aspectj.bridge.*; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.ISourceLocation; import org.aspectj.bridge.MessageUtil; @@ -52,13 +53,14 @@ public class SoftMessage implements IMessage { // XXX mutable dup of Message * Print messages. * @param messages List of IMessage */ - public static void writeXml(XMLWriter out, List messages) { - if ((null == out) || (null == messages)) { + public static void writeXml(XMLWriter out, IMessageHolder messages) { + if ((null == out) || (null == messages) + || (0 == messages.numMessages(null, true))) { return; } - for (Iterator iter = messages.iterator(); iter.hasNext();) { - writeXml(out, (IMessage) iter.next()); - + List list = messages.getUnmodifiableListView(); + for (Iterator iter = list.iterator(); iter.hasNext();) { + writeXml(out, (IMessage) iter.next()); } } |