Skip to content

Commit

Permalink
LDEV-5158 set initial capacity for sqltext when parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Nov 14, 2024
1 parent 66abc04 commit aa44bf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/lucee/runtime/db/SQLImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ private static SQLItems<NamedSQLItem> toNamedSQLItem(String name, Object value)

private static SQL convert(String sql, List<SQLItems<SQLItem>> items, List<SQLItems<NamedSQLItem>> namedItems) throws ApplicationException, PageException {
// if(namedParams.size()==0) return new Pair<String, List<Param>>(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;
Expand Down

0 comments on commit aa44bf6

Please sign in to comment.