mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
consistent initialization for the StringBuilder in DefaultDbSqlContext
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user