TDI-30937 : Fix the tuj with log4j enabled

Optimize the code to reduce the memory usage
This commit is contained in:
Wu Liu
2014-10-27 19:20:47 +08:00
parent 7025474b39
commit 5ddd559d03

View File

@@ -853,7 +853,7 @@ public class NodeUtil {
if (!linesIter.hasNext()) {
return "\"[]\"";
}
value.append("\"[");
value.append("new StringBuilder().append(\"[");
for (;;) {
Map<String, String> columns = linesIter.next();
Iterator<Entry<String, String>> columnsIter = columns.entrySet().iterator();
@@ -869,11 +869,11 @@ public class NodeUtil {
printedColumnExist = true;
value.append(column.getKey());
value.append("=\"+(");
value.append("=\").append((");
value.append(getNormalizeParameterValue(column.getValue(), types.get(column.getKey()), true));
value.append(")+\"");
value.append(")).append(\"");
if (columnsIter.hasNext()) {
value.append(", ");
@@ -885,7 +885,7 @@ public class NodeUtil {
value.append("}");
if (!linesIter.hasNext()) {
return value.append("]\"").toString();
return value.append("]\").toString()").toString();
}
value.append(",").append(" ");
}