You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/03/26 20:17:04 UTC

svn commit: r641494 - /lenya/trunk/src/modules/lucene/java/src/org/apache/lenya/modules/lucene/QueryStringModule.java

Author: andreas
Date: Wed Mar 26 12:17:02 2008
New Revision: 641494

URL: http://svn.apache.org/viewvc?rev=641494&view=rev
Log:
Replacing StringBuilder with StringBuffer since it is not included in Java 1.4.

Modified:
    lenya/trunk/src/modules/lucene/java/src/org/apache/lenya/modules/lucene/QueryStringModule.java

Modified: lenya/trunk/src/modules/lucene/java/src/org/apache/lenya/modules/lucene/QueryStringModule.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/lucene/java/src/org/apache/lenya/modules/lucene/QueryStringModule.java?rev=641494&r1=641493&r2=641494&view=diff
==============================================================================
--- lenya/trunk/src/modules/lucene/java/src/org/apache/lenya/modules/lucene/QueryStringModule.java (original)
+++ lenya/trunk/src/modules/lucene/java/src/org/apache/lenya/modules/lucene/QueryStringModule.java Wed Mar 26 12:17:02 2008
@@ -33,7 +33,6 @@
 import org.apache.lenya.cms.metadata.MetaDataRegistry;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.Query;
 import org.apache.lucene.search.TermQuery;
 
 /**
@@ -129,17 +128,17 @@
     }
 
     protected String escape(final String prefix) {
-        StringBuilder builder = new StringBuilder();
+        StringBuffer buffer = new StringBuffer();
         StringCharacterIterator i = new StringCharacterIterator(prefix);
         char c = i.current();
         while (c != CharacterIterator.DONE) {
             if (shallEscape(c)) {
-                builder.append('\\');
+                buffer.append('\\');
             }
-            builder.append(c);
+            buffer.append(c);
             c = i.next();
         }
-        return builder.toString();
+        return buffer.toString();
     }
     
     protected Term getTerm(String field, String value) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org