jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r1177524 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DefaultHighlighter.java
Date Fri, 30 Sep 2011 06:10:13 GMT
Author: dbrosius
Date: Fri Sep 30 06:10:13 2011
New Revision: 1177524

URL: http://svn.apache.org/viewvc?rev=1177524&view=rev
Log:
guard against npes

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DefaultHighlighter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DefaultHighlighter.java?rev=1177524&r1=1177523&r2=1177524&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DefaultHighlighter.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DefaultHighlighter.java
Fri Sep 30 06:10:13 2011
@@ -152,8 +152,11 @@ public class DefaultHighlighter {
         Iterator<Term[]> it = queryTerms.iterator();
         while (it.hasNext()) {
             Term[] qt = it.next();
+            if (qt == null) {
+                continue;
+            }
             final int qtLen = qt.length;
-            if (qt == null || qtLen == 0) {
+            if (qtLen == 0) {
                 continue;
             }
             String[] qtText = new String[qtLen];



Mime
View raw message