jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1209111 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SharedFieldCache.java
Date Thu, 01 Dec 2011 14:54:38 GMT
Author: alexparvulescu
Date: Thu Dec  1 14:54:37 2011
New Revision: 1209111

URL: http://svn.apache.org/viewvc?rev=1209111&view=rev
Log:
JCR-2906 Multivalued property sorted by last/random value
 - fixed Java5 compliance issue

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SharedFieldCache.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SharedFieldCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SharedFieldCache.java?rev=1209111&r1=1209110&r2=1209111&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SharedFieldCache.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SharedFieldCache.java
Thu Dec  1 14:54:37 2011
@@ -163,8 +163,10 @@ public class SharedFieldCache {
 
             // after
             if (index >= offset + c.length) {
-                c = Arrays.copyOf(c, index - offset + 1);
-                c[index - offset] = item;
+                Comparable<?>[] newC = new Comparable[index - offset + 1];
+                System.arraycopy(c, 0, newC, 0, c.length);
+                newC[index - offset] = item;
+                c = newC;
                 return this;
             }
             return this;



Mime
View raw message