[jbosstools-commits] JBoss Tools SVN: r43724 - in trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common: xml and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Sep 14 19:58:25 EDT 2012


Author: dgolovin
Date: 2012-09-14 19:58:25 -0400 (Fri, 14 Sep 2012)
New Revision: 43724

Modified:
   trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/text/TextProposal.java
   trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLUtilities.java
Log:
code cleanup in common.core plugin StringBuffer replaced with StringBuilder

Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/text/TextProposal.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/text/TextProposal.java	2012-09-14 23:23:24 UTC (rev 43723)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/text/TextProposal.java	2012-09-14 23:58:25 UTC (rev 43724)
@@ -132,7 +132,7 @@
 	public String getLabel() {
 		String l = label != null ? label : getReplacementString() == null ? "" : getReplacementString(); //$NON-NLS-1$
 	
-		StringBuffer dispLabel = new StringBuffer(l);
+		StringBuilder dispLabel = new StringBuilder(l);
 		if (type != null) {
 			dispLabel.append(" : ");  //$NON-NLS-1$
 			dispLabel.append(type);
@@ -259,7 +259,7 @@
 	 * @see java.lang.Object#toString()
 	 */
 	public String toString() {
-		StringBuffer buffer = new StringBuffer();
+		StringBuilder buffer = new StringBuilder();
 		buffer.append("label: "); //$NON-NLS-1$
 		buffer.append(label);
 		buffer.append("\ncontextInfo: "); //$NON-NLS-1$

Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLUtilities.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLUtilities.java	2012-09-14 23:23:24 UTC (rev 43723)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLUtilities.java	2012-09-14 23:58:25 UTC (rev 43724)
@@ -370,7 +370,7 @@
     }
 
     public static final String getCDATA(Element elem, boolean trim) {
-        StringBuffer sb = new StringBuffer();
+    	StringBuilder sb = new StringBuilder();
         NodeList nl = elem.getChildNodes();
         for (int i = 0; i < nl.getLength(); i++) {
             Node nc = nl.item(i);
@@ -388,7 +388,7 @@
     }
 
     public static final String getComment(Element elem) {
-        StringBuffer sb = new StringBuffer();
+    	StringBuilder sb = new StringBuilder();
         Node node = elem.getPreviousSibling();
         while (node != null) {
             if (node.getNodeType() == Node.ELEMENT_NODE) {



More information about the jbosstools-commits mailing list