jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1173707 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractExcerpt.java
Date Wed, 21 Sep 2011 15:22:57 GMT
Author: alexparvulescu
Date: Wed Sep 21 15:22:57 2011
New Revision: 1173707

URL: http://svn.apache.org/viewvc?rev=1173707&view=rev
Log:
JCR-3075 incorrect HTML excerpt generation for queries on japanese text content
 - tweaked the code to be similar to the 2.2 branch

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractExcerpt.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractExcerpt.java?rev=1173707&r1=1173706&r2=1173707&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractExcerpt.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractExcerpt.java
Wed Sep 21 15:22:57 2011
@@ -21,7 +21,6 @@ import java.io.Reader;
 import java.io.StringReader;
 import java.util.Arrays;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.Set;
 import java.util.SortedMap;
@@ -190,9 +189,7 @@ public abstract class AbstractExcerpt im
     private static void getQueryTerms(Query q, Set<Term[]> relevantTerms) {
         if (q instanceof BooleanQuery) {
             final BooleanQuery bq = (BooleanQuery) q;
-            Iterator<BooleanClause> clIterator = bq.iterator();
-            while (clIterator.hasNext()) {
-                BooleanClause clause = clIterator.next();
+            for (BooleanClause clause : bq.getClauses()) {
                 getQueryTerms(clause.getQuery(), relevantTerms);
             }
             return;



Mime
View raw message