jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1340974 - /jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/stats/QueryStatImpl.java
Date Mon, 21 May 2012 11:38:07 GMT
Author: alexparvulescu
Date: Mon May 21 11:38:06 2012
New Revision: 1340974

URL: http://svn.apache.org/viewvc?rev=1340974&view=rev
Log:
JCR-3234 QueryStat getPopularQueries doesn't set the proper position (ported to 2.4)

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

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/stats/QueryStatImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/stats/QueryStatImpl.java?rev=1340974&r1=1340973&r2=1340974&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/stats/QueryStatImpl.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/stats/QueryStatImpl.java
Mon May 21 11:38:06 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