提交 d912f77a 编写于 作者: S Stephane Nicoll

Merge pull request #1280 from marschall:SPR-15075

* pr/1280:
  Remove String#toCharArray from ScriptUtils
......@@ -178,9 +178,8 @@ public abstract class ScriptUtils {
boolean inSingleQuote = false;
boolean inDoubleQuote = false;
boolean inEscape = false;
char[] content = script.toCharArray();
for (int i = 0; i < script.length(); i++) {
char c = content[i];
char c = script.charAt(i);
if (inEscape) {
inEscape = false;
sb.append(c);
......@@ -342,9 +341,8 @@ public abstract class ScriptUtils {
*/
public static boolean containsSqlScriptDelimiters(String script, String delim) {
boolean inLiteral = false;
char[] content = script.toCharArray();
for (int i = 0; i < script.length(); i++) {
if (content[i] == '\'') {
if (script.charAt(i) == '\'') {
inLiteral = !inLiteral;
}
if (!inLiteral && script.startsWith(delim, i)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册