Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 3ef6843

Browse files
committed
HQLPARSER-10 Avoid checking for log level in a loop
1 parent fe84249 commit 3ef6843

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

parser/src/main/java/org/hibernate/hql/QueryParser.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,11 @@ public <T> T parseQuery(String queryString, AstProcessingChain<T> processingChai
7171

7272
CommonTree tree = (CommonTree) r.getTree();
7373

74+
final boolean debugEnabled = log.isDebugEnabled();
7475
for ( AstProcessor processor : processingChain ) {
7576
tree = processor.process( tokens, tree );
7677

77-
if ( log.isDebugEnabled() ) {
78+
if ( debugEnabled ) {
7879
log.debug( "Processed tree: " + tree.toStringTree() );
7980
}
8081
}

0 commit comments

Comments
 (0)