} catch (Exception e) {
return Collections.<Violation> singletonList(new SyntaxErrorViolation(e, sql));
}
if (parser.getLexer().token() != Token.EOF) {
return Collections.<Violation> singletonList(new IllegalSQLObjectViolation(sql));
}
if (statementList.size() > 1 && !config.isMultiStatementAllow()) {
return Collections.<Violation> singletonList(new IllegalSQLObjectViolation(sql));
}
SQLStatement stmt = statementList.get(0);
WallVisitor visitor = createWallVisitor();
try {
stmt.accept(visitor);
} catch (ParserException e) {
return Collections.<Violation> singletonList(new IllegalSQLObjectViolation(sql));
}
if (visitor.getViolations().size() == 0) {
if (sql.length() < whiteSqlMaxLength) {
this.addWhiteSql(sql);