Skip to content

Commit

Permalink
fix SQLParserUtils#splitAndRemoveComment
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed May 25, 2024
1 parent 9b45ad1 commit 822141b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ public static List<String> splitAndRemoveComment(String sql, DbType dbType) {
start = lexer.startPos;
}

for (int tokens = 0; lexer.token != Token.EOF; ) {
for (int tokens = 1; lexer.token != Token.EOF; ) {
if (token == Token.SEMI) {
int len = lexer.startPos - start;
if (len > 0) {
Expand Down Expand Up @@ -878,7 +878,7 @@ public static String removeComment(String sql, DbType dbType) {
}

sql = sql.trim();
if (sql.startsWith("jar")) {
if (sql.startsWith("jar") || sql.startsWith("JAR")) {
return sql;
}

Expand Down

0 comments on commit 822141b

Please sign in to comment.