@@ -, +, @@ --- .../http/org/apache/jmeter/protocol/http/parser/CssParser.java | 9 ++------- .../org/apache/jmeter/protocol/http/parser/URLCollection.java | 3 ++- 2 files changed, 4 insertions(+), 8 deletions(-) --- a/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParser.java +++ a/src/protocol/http/org/apache/jmeter/protocol/http/parser/CssParser.java @@ -23,6 +23,7 @@ import java.nio.charset.Charset; import java.util.Collections; import java.util.Iterator; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.tuple.ImmutableTriple; import org.apache.commons.lang3.tuple.Triple; @@ -70,13 +71,7 @@ public class CssParser implements LinkExtractorParser { final URLCollection urlCollection = orDefault(CSS_URL_CACHE.get(triple), EMPTY_URL_COLLECTION); if (LOG.isDebugEnabled()) { - StringBuilder builder = new StringBuilder(); - for (Iterator iterator = urlCollection.iterator(); iterator - .hasNext();) { - URL urlString = iterator.next(); - builder.append(urlString).append(','); - } - LOG.debug("Parsed:" + baseUrl + ", got:" + builder.toString()); + LOG.debug("Parsed:" + baseUrl + ", got:" + StringUtils.join(urlCollection, ",")); } return urlCollection.iterator(); --- a/src/protocol/http/org/apache/jmeter/protocol/http/parser/URLCollection.java +++ a/src/protocol/http/org/apache/jmeter/protocol/http/parser/URLCollection.java @@ -39,7 +39,7 @@ import org.apache.log.Logger; * does not support remove() * */ -public class URLCollection { +public class URLCollection implements Iterable { private static final Logger log = LoggingManager.getLoggerForClass(); private final Collection coll; @@ -99,6 +99,7 @@ public class URLCollection { return b; } + @Override public Iterator iterator() { return new UrlIterator(coll.iterator()); } --