jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1077970 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryFactory.java
Date Fri, 04 Mar 2011 14:40:12 GMT
Author: jukka
Date: Fri Mar  4 14:40:12 2011
New Revision: 1077970

URL: http://svn.apache.org/viewvc?rev=1077970&view=rev
Log:
JCR-2899: [patch] fix uppercase/lowercase handling for not equal to

Based on a patch by Dave Brosius

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryFactory.java?rev=1077970&r1=1077969&r2=1077970&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryFactory.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryFactory.java
Fri Mar  4 14:40:12 2011
@@ -666,12 +666,11 @@ public class LuceneQueryFactory {
             BooleanQuery query = new BooleanQuery();
             query.add(Util.createMatchAllQuery(
                     field, index.getIndexFormatVersion(), cache), SHOULD);
-            switch (transform) {
-            case TRANSFORM_UPPER_CASE:
+            if (transform == TRANSFORM_UPPER_CASE) {
                 query.add(new CaseTermQuery.Upper(term), MUST_NOT);
-            case TRANSFORM_LOWER_CASE:
+            } else if (transform == TRANSFORM_LOWER_CASE) {
                 query.add(new CaseTermQuery.Lower(term), MUST_NOT);
-            default:
+            } else {
                 query.add(new JackrabbitTermQuery(term), MUST_NOT);
             }
             // and exclude all nodes where 'field' is multi valued



Mime
View raw message