From: Manuel Carrasco MoƱino Date: Tue, 9 Apr 2013 10:12:36 +0000 (+0200) Subject: cosmetic and formal change of string sum by string builder. I believe it does not... X-Git-Tag: release-1.4.0~56^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6aa374317ce6d526364c4eb0897f1c23986c91e9;p=gwtquery.git cosmetic and formal change of string sum by string builder. I believe it does not improves anything in compiled mode though. --- diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java index 2b961c2a..00b41def 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java @@ -53,27 +53,27 @@ public abstract class Function { } private String dumpArguments(Object[] arguments, String sep) { - String ret = ""; + StringBuilder b = new StringBuilder(); for (int i = 0, l = arguments.length; i < l; i++ ) { - ret += "[" + i + "]"; + b.append("[").append(i).append("]"); Object o = arguments[i]; if (o == null) { - ret += " null"; + b.append(" null"); } else if (o.getClass().isArray()) { - ret += dumpArguments((Object[])o, sep + " "); + b.append(dumpArguments((Object[])o, sep + " ")); } else if (o instanceof JavaScriptObject) { JavaScriptObject jso = (JavaScriptObject)o; if (JsUtils.isElement(jso)) { - ret += "(Element) " + jso.toString(); + b.append("(Element) ").append(jso.toString()); } else { - ret += "(JSO) " + jso.cast().toJsonString(); + b.append("(JSO) ").append(jso.cast().toJsonString()); } } else { - ret += "(" + o.getClass().getName() + ") " + o; + b.append("(").append(o.getClass().getName()).append(") ").append(o); } - if (i < l-1) ret += sep; + if (i < l-1) b.append(sep); } - return ret; + return b.toString(); } public T getElement() {