jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1378643 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/lucene/LuceneIndex.java
Date Wed, 29 Aug 2012 17:01:01 GMT
Author: alexparvulescu
Date: Wed Aug 29 17:01:01 2012
New Revision: 1378643

URL: http://svn.apache.org/viewvc?rev=1378643&view=rev
Log:
OAK-286 Possible NPE in LuceneIndex

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/lucene/LuceneIndex.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/lucene/LuceneIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/lucene/LuceneIndex.java?rev=1378643&r1=1378642&r2=1378643&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/lucene/LuceneIndex.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/lucene/LuceneIndex.java
Wed Aug 29 17:01:01 2012
@@ -165,7 +165,8 @@ public class LuceneIndex implements Quer
                 last = pr.last.getString();
             }
 
-            if (first.equals(last) && pr.firstIncluding && pr.lastIncluding)
{
+            if (first != null && first.equals(last) && pr.firstIncluding
+                    && pr.lastIncluding) {
                 qs.add(new TermQuery(new Term(name, first)));
             } else {
                 qs.add(TermRangeQuery.newStringRange(name, first, last,



Mime
View raw message