mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
SQLUtils.format catch ClassClastException.
This commit is contained in:
@@ -254,6 +254,9 @@ public class SQLUtils {
|
||||
SQLStatementParser parser = SQLParserUtils.createSQLStatementParser(sql, dbType, FORMAT_DEFAULT_FEATURES);
|
||||
List<SQLStatement> statementList = parser.parseStatementList();
|
||||
return toSQLString(statementList, dbType, parameters, option);
|
||||
} catch (ClassCastException ex) {
|
||||
LOG.warn("format error", ex);
|
||||
return sql;
|
||||
} catch (ParserException ex) {
|
||||
LOG.warn("format error", ex);
|
||||
return sql;
|
||||
|
||||
Reference in New Issue
Block a user