From 0544260aeabbb24c8757d341894df4f5148c4ebb Mon Sep 17 00:00:00 2001 From: wisberg Date: Wed, 14 May 2003 05:04:32 +0000 Subject: [PATCH] - using easier list view of messages --- testing/src/org/aspectj/testing/xml/SoftMessage.java | 12 +++++++----- 1 file 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()); } } -- 2.39.5