jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1242779 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/stats/QueryStatImpl.java
Date Fri, 10 Feb 2012 14:12:22 GMT
Author: alexparvulescu
Date: Fri Feb 10 14:12:21 2012
New Revision: 1242779

URL: http://svn.apache.org/viewvc?rev=1242779&view=rev
Log:
JCR-3234 QueryStat getPopularQueries doesn't set the proper position

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/stats/QueryStatImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/stats/QueryStatImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/stats/QueryStatImpl.java?rev=1242779&r1=1242778&r2=1242779&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/stats/QueryStatImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/stats/QueryStatImpl.java
Fri Feb 10 14:12:21 2012
@@ -158,10 +158,10 @@ public class QueryStatImpl implements Qu
         int retSize = Math.min(size, maxSize / POPULAR_QUEUE_MULTIPLIER);
         QueryStatDto[] retval = new QueryStatDto[retSize];
         for (int i = 0; i < retSize; i++) {
-            top[i].setPosition(i + 1);
             retval[i] = top[i];
+            retval[i].setPosition(i + 1);
         }
-        return top;
+        return retval;
     }
 
     public int getPopularQueriesQueueSize() {



Mime
View raw message