jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r888419 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DocId.java
Date Tue, 08 Dec 2009 14:53:37 GMT
Author: mreutegg
Date: Tue Dec  8 14:53:36 2009
New Revision: 888419

URL: http://svn.apache.org/viewvc?rev=888419&view=rev
Log:
JCR-2427: UUIDDocId.getDocumentNumbers() may return illegal value

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DocId.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DocId.java?rev=888419&r1=888418&r2=888419&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DocId.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DocId.java
Tue Dec  8 14:53:36 2009
@@ -16,11 +16,13 @@
  */
 package org.apache.jackrabbit.core.query.lucene;
 
-import org.apache.jackrabbit.core.id.NodeId;
-
 import java.io.IOException;
 import java.util.BitSet;
 
+import org.apache.jackrabbit.core.id.NodeId;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * Implements a document id which can be based on a Node uuid or a lucene
  * document number.
@@ -207,6 +209,11 @@
     private static final class UUIDDocId extends DocId {
 
         /**
+         * The logger instance for this class.
+         */
+        private static final Logger log = LoggerFactory.getLogger(UUIDDocId.class);
+
+        /**
          * The node identifier.
          */
         private final NodeId id;
@@ -241,6 +248,9 @@
                 if (segDocId != null) {
                     realDoc = reader.getDocumentNumber(segDocId);
                     doc = segDocId;
+                } else {
+                    log.warn("Unknown parent node with id {}", id);
+                    return EMPTY;
                 }
             }
 



Mime
View raw message