Fix ScriptUtils for MS Windows line ending

Prior to this commit, ScriptUtils did not properly split SQL
scripts that contained line endings for MS Windows.

Closes gh-23019
This commit is contained in:
chrunchyjesus
2019-05-23 20:20:25 +02:00
committed by Sam Brannen
parent 5f7541344a
commit 771a05e878
2 changed files with 20 additions and 1 deletions

View File

@@ -234,7 +234,7 @@ public abstract class ScriptUtils {
"Missing block comment end delimiter: " + blockCommentEndDelimiter, resource);
}
}
else if (c == ' ' || c == '\n' || c == '\t') {
else if (c == ' ' || c == '\r' || c == '\n' || c == '\t') {
// Avoid multiple adjacent whitespace characters
if (sb.length() > 0 && sb.charAt(sb.length() - 1) != ' ') {
c = ' ';