Skip to content

Commit

Permalink
LPD-20641 Optimize trying to reduce as much as possible String manipu…
Browse files Browse the repository at this point in the history
…lation. It's more likely to encounter long String than String with multiple placeholder occurrences.
  • Loading branch information
marianoalvarosaiz authored and brianchandotcom committed Mar 28, 2024
1 parent ac93f76 commit 3f0342c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,11 @@ else if (character == CharPool.CLOSE_PARENTHESIS) {

if (parenthesisCount == 0) {
Matcher matcher = castPattern.matcher(
sql.substring(0, i + 1));
sql.substring(start, i + 1));

return apply(
castFunction.apply(matcher) +
_safeSubstring(sql, i + 1));
return sql.substring(0, start) +
apply(castFunction.apply(matcher)) +
apply(_safeSubstring(sql, i + 1));
}
}

Expand Down

0 comments on commit 3f0342c

Please sign in to comment.