fixed accidental regression with respect to newlines

This commit is contained in:
Juergen Hoeller 2010-08-07 18:02:51 +00:00
parent 58b07f586d
commit 48874801a3
1 changed files with 11 additions and 7 deletions

View File

@ -254,15 +254,19 @@ public class ResourceDatabasePopulator implements DatabasePopulator {
if (c == '\'') {
inLiteral = !inLiteral;
}
if ((c == delim || c == '\n') && !inLiteral) {
if (sb.length() > 0) {
statements.add(sb.toString());
sb = new StringBuilder();
if (!inLiteral) {
if (c == delim) {
if (sb.length() > 0) {
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)) {
statements.add(sb.toString());