Author: vgritsenko
Date: Fri Nov  7 12:07:32 2008
New Revision: 712248

URL: http://svn.apache.org/viewvc?rev=712248&view=rev
Log:
add a null check, just in case.

Modified:
    xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java
    
xml/xindice/trunk/java/src/org/apache/xindice/core/query/XPathQueryResolver.java

Modified: 
xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java
URL: 
http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java?rev=712248&r1=712247&r2=712248&view=diff
==============================================================================
--- 
xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java 
(original)
+++ 
xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java 
Fri Nov  7 12:07:32 2008
@@ -329,7 +329,7 @@
                 // Read only key, we don't need filer-level value
                 Key key = rs.getNextKey();
                 Entry entry = collection.getEntry(key);
-                if (entry.getEntryType() == Entry.DOCUMENT) {
+                if (entry != null && entry.getEntryType() == Entry.DOCUMENT) {
                     try {
                         new DocumentHandler(symbols, key, (Document) 
entry.getValue(), DocumentHandler.ACTION_CREATE, list);
                     } catch (Exception e) {

Modified: 
xml/xindice/trunk/java/src/org/apache/xindice/core/query/XPathQueryResolver.java
URL: 
http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/query/XPathQueryResolver.java?rev=712248&r1=712247&r2=712248&view=diff
==============================================================================
--- 
xml/xindice/trunk/java/src/org/apache/xindice/core/query/XPathQueryResolver.java
 (original)
+++ 
xml/xindice/trunk/java/src/org/apache/xindice/core/query/XPathQueryResolver.java
 Fri Nov  7 12:07:32 2008
@@ -1369,7 +1369,7 @@
                 final Key key = keySet[keyPos++];
 
                 Entry entry = context.getEntry(key);
-                if (entry.getEntryType() != Entry.DOCUMENT) {
+                if (entry == null || entry.getEntryType() != Entry.DOCUMENT) {
                     continue;
                 }
 


Reply via email to