提交 48874801 编写于 作者: J Juergen Hoeller

fixed accidental regression with respect to newlines

上级 58b07f58
...@@ -254,15 +254,19 @@ public class ResourceDatabasePopulator implements DatabasePopulator { ...@@ -254,15 +254,19 @@ public class ResourceDatabasePopulator implements DatabasePopulator {
if (c == '\'') { if (c == '\'') {
inLiteral = !inLiteral; inLiteral = !inLiteral;
} }
if ((c == delim || c == '\n') && !inLiteral) { if (!inLiteral) {
if (sb.length() > 0) { if (c == delim) {
statements.add(sb.toString()); if (sb.length() > 0) {
sb = new StringBuilder(); statements.add(sb.toString());
sb = new StringBuilder();
}
continue;
}
else if (c == '\n' || c == '\t') {
continue;
} }
} }
else { sb.append(c);
sb.append(c);
}
} }
if (StringUtils.hasText(sb)) { if (StringUtils.hasText(sb)) {
statements.add(sb.toString()); statements.add(sb.toString());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册