Author: steve.ebersole(a)jboss.com
Date: 2010-09-25 11:47:57 -0400 (Sat, 25 Sep 2010)
New Revision: 20706
Modified:
core/trunk/core/src/main/java/org/hibernate/stat/ConcurrentStatisticsImpl.java
Log:
HHH-5591 - ConcurrentStatisticsImpl#queryExecuted() does not update
queryExecutionMaxTimeQueryString
Modified: core/trunk/core/src/main/java/org/hibernate/stat/ConcurrentStatisticsImpl.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/stat/ConcurrentStatisticsImpl.java 2010-09-25
15:35:02 UTC (rev 20705)
+++
core/trunk/core/src/main/java/org/hibernate/stat/ConcurrentStatisticsImpl.java 2010-09-25
15:47:57 UTC (rev 20706)
@@ -320,7 +320,7 @@
queryExecutionCount.getAndIncrement();
boolean isLongestQuery = false;
for ( long old = queryExecutionMaxTime.get();
- ( time > old ) && ( isLongestQuery =
!queryExecutionMaxTime.compareAndSet( old, time ) );
+ ( isLongestQuery = time > old ) && (
!queryExecutionMaxTime.compareAndSet( old, time ) );
old = queryExecutionMaxTime.get() ) {
// nothing to do here given the odd loop structure...
}