You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2009/11/17 16:09:18 UTC
svn commit: r881321 -
/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/RSSFeedDemo.java
Author: smartini
Date: Tue Nov 17 15:09:18 2009
New Revision: 881321
URL: http://svn.apache.org/viewvc?rev=881321&view=rev
Log:
reverted to previous version (using string concatenation instead of StringBuffer)
Modified:
incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/RSSFeedDemo.java
Modified: incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/RSSFeedDemo.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/RSSFeedDemo.java?rev=881321&r1=881320&r2=881321&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/RSSFeedDemo.java (original)
+++ incubator/pivot/trunk/demos/src/org/apache/pivot/demos/rss/RSSFeedDemo.java Tue Nov 17 15:09:18 2009
@@ -143,22 +143,20 @@
String title = (String)xpath.evaluate("title", itemElement, XPathConstants.STRING);
titleLabel.setText(title);
-// String categories = "";
- StringBuffer categories = new StringBuffer("");
-
+ String categories = "";
NodeList categoryNodeList = (NodeList)xpath.evaluate("category", itemElement,
XPathConstants.NODESET);
for (int j = 0; j < categoryNodeList.getLength(); j++) {
Element categoryElement = (Element)categoryNodeList.item(j);
String category = categoryElement.getTextContent();
if (j > 0) {
- categories.append(", ");
+ categories += ", ";
}
- categories.append(category);
+ categories += category;
}
- categoriesLabel.setText(categories.toString());
+ categoriesLabel.setText(categories);
String submitter = (String)xpath.evaluate("dz:submitter/dz:username", itemElement,
XPathConstants.STRING);
@@ -229,7 +227,7 @@
return false;
}
- }
+ };
private XPath xpath;