bug fixed for WallFilter, empty sql

This commit is contained in:
wenshao
2012-10-20 10:12:32 +08:00
parent 26e3fa3987
commit 951432cc49
@@ -147,6 +147,10 @@ public abstract class WallProvider {
if (parser.getLexer().token() != Token.EOF) {
return Collections.<Violation> singletonList(new IllegalSQLObjectViolation(sql));
}
if (statementList.size() == 0) {
return Collections.emptyList();
}
if (statementList.size() > 1 && !config.isMultiStatementAllow()) {
return Collections.<Violation> singletonList(new IllegalSQLObjectViolation(sql));