jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r758667 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingIndexReader.java
Date Thu, 26 Mar 2009 14:42:08 GMT
Author: mreutegg
Date: Thu Mar 26 14:41:56 2009
New Revision: 758667

URL: http://svn.apache.org/viewvc?rev=758667&view=rev
Log:
JCR-2015: CachingIndexReader: NullPointerException initializing parents cache

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingIndexReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingIndexReader.java?rev=758667&r1=758666&r2=758667&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingIndexReader.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingIndexReader.java
Thu Mar 26 14:41:56 2009
@@ -378,7 +378,7 @@
             collectTermDocs(reader, new Term(FieldNames.UUID, ""), new TermDocsCollector()
{
                 public void collect(Term term, TermDocs tDocs) throws IOException {
                     UUID uuid = UUID.fromString(term.text());
-                    if (tDocs.next()) {
+                    while (tDocs.next()) {
                         NodeInfo info = new NodeInfo(tDocs.doc(), uuid);
                         docs.put(new Integer(info.docId), info);
                     }
@@ -388,8 +388,8 @@
             // read PARENTs
             collectTermDocs(reader, new Term(FieldNames.PARENT, "0"), new TermDocsCollector()
{
                 public void collect(Term term, TermDocs tDocs) throws IOException {
+                    UUID uuid = UUID.fromString(term.text());
                     while (tDocs.next()) {
-                        UUID uuid = UUID.fromString(term.text());
                         Integer docId = new Integer(tDocs.doc());
                         NodeInfo info = (NodeInfo) docs.get(docId);
                         info.parent = uuid;



Mime
View raw message