From 6aa374317ce6d526364c4eb0897f1c23986c91e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Carrasco=20Mo=C3=B1ino?= Date: Tue, 9 Apr 2013 12:12:36 +0200 Subject: [PATCH] cosmetic and formal change of string sum by string builder. I believe it does not improves anything in compiled mode though. --- .../com/google/gwt/query/client/Function.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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() { -- 2.39.5