diff --git a/core/src/main/java/lucee/runtime/db/SQLImpl.java b/core/src/main/java/lucee/runtime/db/SQLImpl.java index ca33cd940e..c7ed7c5312 100644 --- a/core/src/main/java/lucee/runtime/db/SQLImpl.java +++ b/core/src/main/java/lucee/runtime/db/SQLImpl.java @@ -105,8 +105,8 @@ public String toString(boolean pattern) { if (items.length == 0) return strSQL; - StringBuilder sb = new StringBuilder(); int sqlLen = strSQL.length(); + StringBuilder sb = new StringBuilder(sqlLen); char c, quoteType = 0, p = 0; boolean inQuotes = false; int index = 0; diff --git a/core/src/main/java/lucee/runtime/tag/util/QueryParamConverter.java b/core/src/main/java/lucee/runtime/tag/util/QueryParamConverter.java index 707d129eff..efae75c346 100644 --- a/core/src/main/java/lucee/runtime/tag/util/QueryParamConverter.java +++ b/core/src/main/java/lucee/runtime/tag/util/QueryParamConverter.java @@ -137,9 +137,9 @@ private static SQLItems toNamedSQLItem(String name, Object value) private static SQL convert(String sql, List> items, List> namedItems) throws ApplicationException, PageException { // if(namedParams.size()==0) return new Pair>(sql,params); - - StringBuilder sb = new StringBuilder(); - int sqlLen = sql.length(), initialParamSize = items.size(); + int sqlLen = sql.length(); + StringBuilder sb = new StringBuilder(sqlLen); + int initialParamSize = items.size(); char c, quoteType = 0, p = 0, pp = 0; boolean inQuotes = false; int qm = 0, _qm = 0;