consistent initialization for the StringBuilder in DefaultDbSqlContext

This commit is contained in:
Robert Biter
2013-05-02 11:04:45 +03:00
parent eb61246254
commit 464cb38b8b
@@ -14,6 +14,7 @@ public class DefaultDbSqlContext implements DbSqlContext {
private static final String COMMA = ", ";
private static final String PERIOD = ".";
private static final int STRING_BUILDER_INITIAL_CAPACITY = 140;
private final String tableAliasPlaceHolder;
@@ -29,7 +30,7 @@ public class DefaultDbSqlContext implements DbSqlContext {
private int columnIndex;
private StringBuilder sb = new StringBuilder(140);
private StringBuilder sb = new StringBuilder(STRING_BUILDER_INITIAL_CAPACITY);
/**
* A Set used to make sure formula joins are only added once to a query.
@@ -253,7 +254,7 @@ public class DefaultDbSqlContext implements DbSqlContext {
public String getContent() {
String s = sb.toString();
sb = new StringBuilder();
sb = new StringBuilder(STRING_BUILDER_INITIAL_CAPACITY);
return s;
}