From 1ee3be2da791b7d5a37ec065611c9b786be6662e Mon Sep 17 00:00:00 2001 From: Strong Liu Date: Tue, 26 Mar 2013 16:35:16 +0800 Subject: [PATCH] HHH-7869 code format --- .../hql/internal/classic/ParserHelper.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/ParserHelper.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/ParserHelper.java index 923805a6ac..5bb0117351 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/ParserHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/ParserHelper.java @@ -23,6 +23,7 @@ * */ package org.hibernate.hql.internal.classic; + import java.util.BitSet; import java.util.StringTokenizer; @@ -34,17 +35,19 @@ public final class ParserHelper { public static final String HQL_VARIABLE_PREFIX = ":"; public static final String HQL_SEPARATORS = " \n\r\f\t,()=<>&|+-=/*'^![]#~\\"; - public static final BitSet HQL_SEPARATORS_BITSET = new BitSet( ); + public static final BitSet HQL_SEPARATORS_BITSET = new BitSet(); + static { - for(int i=0;i -1; + return StringHelper.WHITESPACE.contains( str ); } private ParserHelper() { @@ -54,7 +57,9 @@ public final class ParserHelper { public static void parse(Parser p, String text, String seperators, QueryTranslatorImpl q) throws QueryException { StringTokenizer tokens = new StringTokenizer( text, seperators, true ); p.start( q ); - while ( tokens.hasMoreElements() ) p.token( tokens.nextToken(), q ); + while ( tokens.hasMoreElements() ) { + p.token( tokens.nextToken(), q ); + } p.end( q ); }