lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r821443 - in /lucene/java/trunk/contrib: ./ surround/src/java/org/apache/lucene/queryParser/surround/query/ surround/src/test/org/apache/lucene/queryParser/surround/query/
Date Sat, 03 Oct 2009 23:10:28 GMT
Author: uschindler
Date: Sat Oct  3 23:10:27 2009
New Revision: 821443

URL: http://svn.apache.org/viewvc?rev=821443&view=rev
Log:
LUCENE-1257: Change some occurrences of StringBuffer in public/protected APIs of contrib/surround
to StringBuilder

Modified:
    lucene/java/trunk/contrib/CHANGES.txt
    lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/ComposedQuery.java
    lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java
    lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java
    lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndPrefixQuery.java
    lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndQuery.java
    lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndTruncQuery.java
    lucene/java/trunk/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/ExceptionQueryTst.java

Modified: lucene/java/trunk/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/CHANGES.txt?rev=821443&r1=821442&r2=821443&view=diff
==============================================================================
--- lucene/java/trunk/contrib/CHANGES.txt (original)
+++ lucene/java/trunk/contrib/CHANGES.txt Sat Oct  3 23:10:27 2009
@@ -2,6 +2,12 @@
 
 ======================= Trunk (not yet released) =======================
 
+Changes in backwards compatibility policy
+
+ * LUCENE-1257: Change some occurences of StringBuffer in public/protected
+   APIs of contrib/surround to StringBuilder.
+   (Paul Elschot via Uwe Schindler)
+
 Changes in runtime behavior
 
 API Changes

Modified: lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/ComposedQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/ComposedQuery.java?rev=821443&r1=821442&r2=821443&view=diff
==============================================================================
--- lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/ComposedQuery.java
(original)
+++ lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/ComposedQuery.java
Sat Oct  3 23:10:27 2009
@@ -57,7 +57,7 @@
   }
 
   public String toString() {
-    StringBuffer r = new StringBuffer();
+    StringBuilder r = new StringBuilder();
     if (isOperatorInfix()) {
       infixToString(r);
     } else {
@@ -72,7 +72,7 @@
   protected String getBracketOpen() { return "(";}
   protected String getBracketClose() { return ")";}
   
-  protected void infixToString(StringBuffer r) {
+  protected void infixToString(StringBuilder r) {
     /* Brackets are possibly redundant in the result. */
     Iterator sqi = getSubQueriesIterator();
     r.append(getBracketOpen());
@@ -88,7 +88,7 @@
     r.append(getBracketClose());
   }
 
-  protected void prefixToString(StringBuffer r) {
+  protected void prefixToString(StringBuilder r) {
     Iterator sqi = getSubQueriesIterator();
     r.append(getOperatorName()); /* prefix operator */
     r.append(getBracketOpen());

Modified: lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java?rev=821443&r1=821442&r2=821443&view=diff
==============================================================================
--- lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java
(original)
+++ lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java
Sat Oct  3 23:10:27 2009
@@ -75,7 +75,7 @@
   public char getFieldOperator() { return fieldOp;}
   
   public String toString() {
-    StringBuffer r = new StringBuffer();
+    StringBuilder r = new StringBuilder();
     r.append("(");
     fieldNamesToString(r);
     r.append(q.toString());
@@ -83,7 +83,7 @@
     return r.toString();
   }
   
-  protected void fieldNamesToString(StringBuffer r) {
+  protected void fieldNamesToString(StringBuilder r) {
     Iterator fni = getFieldNames().listIterator();
     while (fni.hasNext()) {
       r.append((String) fni.next());

Modified: lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java?rev=821443&r1=821442&r2=821443&view=diff
==============================================================================
--- lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java
(original)
+++ lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java
Sat Oct  3 23:10:27 2009
@@ -45,10 +45,10 @@
     return this.toStringUnquoted().compareTo( ost.toStringUnquoted());
   }
   
-  protected void suffixToString(StringBuffer r) {;} /* override for prefix query */
+  protected void suffixToString(StringBuilder r) {;} /* override for prefix query */
   
   public String toString() {
-    StringBuffer r = new StringBuffer();
+    StringBuilder r = new StringBuilder();
     if (isQuoted()) {
       r.append(getQuote());
     }

Modified: lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndPrefixQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndPrefixQuery.java?rev=821443&r1=821442&r2=821443&view=diff
==============================================================================
--- lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndPrefixQuery.java
(original)
+++ lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndPrefixQuery.java
Sat Oct  3 23:10:27 2009
@@ -42,7 +42,7 @@
   
   public String toStringUnquoted() {return getPrefix();}
   
-  protected void suffixToString(StringBuffer r) {r.append(getSuffixOperator());}
+  protected void suffixToString(StringBuilder r) {r.append(getSuffixOperator());}
   
   public void visitMatchingTerms(
     IndexReader reader,

Modified: lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndQuery.java?rev=821443&r1=821442&r2=821443&view=diff
==============================================================================
--- lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndQuery.java
(original)
+++ lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndQuery.java
Sat Oct  3 23:10:27 2009
@@ -36,7 +36,7 @@
 
   public String getWeightOperator() {return "^";}
 
-  protected void weightToString(StringBuffer r) { /* append the weight part of a query */
+  protected void weightToString(StringBuilder r) { /* append the weight part of a query */
     if (isWeighted()) {
       r.append(getWeightOperator());
       r.append(getWeightString());

Modified: lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndTruncQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndTruncQuery.java?rev=821443&r1=821442&r2=821443&view=diff
==============================================================================
--- lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndTruncQuery.java
(original)
+++ lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SrndTruncQuery.java
Sat Oct  3 23:10:27 2009
@@ -52,7 +52,7 @@
     return (c != unlimited) && (c != mask);
   }
 
-  protected void appendRegExpForChar(char c, StringBuffer re) {
+  protected void appendRegExpForChar(char c, StringBuilder re) {
     if (c == unlimited)
       re.append(".*");
     else if (c == mask)
@@ -68,7 +68,7 @@
     }
     prefix = truncated.substring(0, i);
     
-    StringBuffer re = new StringBuffer();
+    StringBuilder re = new StringBuilder();
     while (i < truncated.length()) {
       appendRegExpForChar(truncated.charAt(i), re);
       i++;

Modified: lucene/java/trunk/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/ExceptionQueryTst.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/ExceptionQueryTst.java?rev=821443&r1=821442&r2=821443&view=diff
==============================================================================
--- lucene/java/trunk/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/ExceptionQueryTst.java
(original)
+++ lucene/java/trunk/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/ExceptionQueryTst.java
Sat Oct  3 23:10:27 2009
@@ -30,7 +30,7 @@
     this.verbose = verbose;
   }
 
-  public void doTest(StringBuffer failQueries) {
+  public void doTest(StringBuilder failQueries) {
     boolean pass = false;
     SrndQuery lq = null;
     try {
@@ -55,7 +55,7 @@
   }
   
   public static String getFailQueries(String[] exceptionQueries, boolean verbose) {
-    StringBuffer failQueries = new StringBuffer();
+    StringBuilder failQueries = new StringBuilder();
     for (int i = 0; i < exceptionQueries.length; i++ ) {
       new ExceptionQueryTst( exceptionQueries[i], verbose).doTest(failQueries);
     }



Mime
View raw message