jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r290665 - /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/DocOrderNodeIteratorImpl.java
Date Wed, 21 Sep 2005 09:30:39 GMT
Author: mreutegg
Date: Wed Sep 21 02:30:37 2005
New Revision: 290665

URL: http://svn.apache.org/viewcvs?rev=290665&view=rev
Log:
- DocOrderNodeIteratorImpl may throw NullPointerException in initOrderedIterator() if invalidUUIDs
contains duplicate uuids.

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/DocOrderNodeIteratorImpl.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/DocOrderNodeIteratorImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/DocOrderNodeIteratorImpl.java?rev=290665&r1=290664&r2=290665&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/DocOrderNodeIteratorImpl.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/lucene/DocOrderNodeIteratorImpl.java
Wed Sep 21 02:30:37 2005
@@ -164,14 +164,13 @@
         do {
             if (invalidUUIDs.size() > 0) {
                 // previous sort run was not successful -> remove failed uuids
-                ScoreNode[] tmp = new ScoreNode[nodes.length - invalidUUIDs.size()];
-                int newIdx = 0;
+                List tmp = new ArrayList();
                 for (int i = 0; i < nodes.length; i++) {
                     if (!invalidUUIDs.contains(nodes[i].uuid)) {
-                        tmp[newIdx++] = nodes[i];
+                        tmp.add(nodes[i]);
                     }
                 }
-                nodes = tmp;
+                nodes = (ScoreNode[]) tmp.toArray(new ScoreNode[tmp.size()]);
                 invalidUUIDs.clear();
             }
 



Mime
View raw message