You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by un...@apache.org on 2013/02/12 17:14:47 UTC

svn commit: r1445232 - /jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ConsistencyCheck.java

Author: unico
Date: Tue Feb 12 16:14:47 2013
New Revision: 1445232

URL: http://svn.apache.org/r1445232
Log:
JCR-3516 uuid should not be added to the map of node ids that are in the repository when it is only in the index

Modified:
    jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ConsistencyCheck.java

Modified: jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ConsistencyCheck.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ConsistencyCheck.java?rev=1445232&r1=1445231&r2=1445232&view=diff
==============================================================================
--- jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ConsistencyCheck.java (original)
+++ jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ConsistencyCheck.java Tue Feb 12 16:14:47 2013
@@ -281,9 +281,9 @@ public class ConsistencyCheck {
                 }
                 Document d = reader.document(i, FieldSelectors.UUID);
                 NodeId id = new NodeId(d.get(FieldNames.UUID));
-                Boolean alreadyIndexed = nodeIds.put(id, Boolean.TRUE);
-                boolean nodeExists = alreadyIndexed != null;
+                boolean nodeExists = nodeIds.containsKey(id);
                 if (nodeExists) {
+                    Boolean alreadyIndexed = nodeIds.put(id, Boolean.TRUE);
                     if (alreadyIndexed) {
                         multipleEntries.add(id);
                     }