HHH-11028 - {h-schema} is not replaced in SQLDelete, SQLInsert and SQLUpdate

Trim the sQL query before checking it for {h-schema} placeholders
This commit is contained in:
Vlad Mihalcea 2017-11-21 15:46:36 +02:00
parent 88c2bda837
commit 5b710533f7
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ public class SQLQueryParser {
// don't get'em'all we throw an exception! Way better than trial and error ;) // don't get'em'all we throw an exception! Way better than trial and error ;)
protected String substituteBrackets(String sqlQuery) throws QueryException { protected String substituteBrackets(String sqlQuery) throws QueryException {
if ( PREPARED_STATEMENT_PATTERN.matcher( sqlQuery ).matches() ) { if ( PREPARED_STATEMENT_PATTERN.matcher( sqlQuery.trim() ).matches() ) {
return sqlQuery; return sqlQuery;
} }