diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/QueryParameters.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/QueryParameters.java index 77c5fc34d7..c54e669f72 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/QueryParameters.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/QueryParameters.java @@ -36,6 +36,11 @@ import org.jboss.logging.Logger; public final class QueryParameters { private static final Logger LOG = CoreLogging.logger( QueryParameters.class ); + /** + * Symbols used to split SQL string into tokens in {@link #processFilters(String, Map, SessionFactoryImplementor)}. + */ + private static final String SYMBOLS = ParserHelper.HQL_SEPARATORS.replace( "'", "" ); + private Type[] positionalParameterTypes; private Object[] positionalParameterValues; private Map namedParameters; @@ -473,10 +478,7 @@ public final class QueryParameters { processedSQL = sql; } else { - final Dialect dialect = factory.getDialect(); - final String symbols = ParserHelper.HQL_SEPARATORS + dialect.openQuote() + dialect.closeQuote(); - final StringTokenizer tokens = new StringTokenizer( sql, symbols, true ); - + final StringTokenizer tokens = new StringTokenizer( sql, SYMBOLS, true ); StringBuilder result = new StringBuilder(); List parameters = new ArrayList(); List parameterTypes = new ArrayList(); diff --git a/hibernate-core/src/test/java/org/hibernate/test/filter/DynamicFilterTest.java b/hibernate-core/src/test/java/org/hibernate/test/filter/DynamicFilterTest.java index c280c9ff1d..4a442bb2b2 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/filter/DynamicFilterTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/filter/DynamicFilterTest.java @@ -462,7 +462,6 @@ public class DynamicFilterTest extends BaseNonConfigCoreFunctionalTestCase { @Test @TestForIssue( jiraKey = "HHH-5932" ) - @FailureExpected( jiraKey = "HHH-5932" ) public void testHqlQueryWithColons() { final Session session = openSession(); session.enableFilter( "region" ).setParameter( "region", "PACA" );