Author: lfryc(a)redhat.com
Date: 2010-07-30 09:24:03 -0400 (Fri, 30 Jul 2010)
New Revision: 18295
Modified:
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/TemplatesList.java
Log:
changed output from TemplatesList#toString - do not write , at the end + do not write
plain at the end with exception that only plain template is used
Modified:
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/TemplatesList.java
===================================================================
---
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/TemplatesList.java 2010-07-30
13:23:25 UTC (rev 18294)
+++
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/TemplatesList.java 2010-07-30
13:24:03 UTC (rev 18295)
@@ -22,6 +22,7 @@
package org.richfaces.tests.metamer;
import java.util.ArrayList;
+import java.util.Iterator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -87,9 +88,16 @@
public String toString() {
StringBuilder sb = new StringBuilder();
- for (int i = 0; i < size(); i++) {
- sb.append(get(i).toString());
- sb.append(",");
+ Iterator<Template> iterator = iterator();
+ while (iterator.hasNext()) {
+ final Template template = iterator.next();
+ if (sb.length() > 0) {
+ if (template == Template.PLAIN) {
+ continue;
+ }
+ sb.append(",");
+ }
+ sb.append(template.toString());
}
return sb.toString();
Show replies by date