You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2012/09/17 23:44:44 UTC

svn commit: r1386860 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/spatial/ lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java

Author: dsmiley
Date: Mon Sep 17 21:44:43 2012
New Revision: 1386860

URL: http://svn.apache.org/viewvc?rev=1386860&view=rev
Log:
Make Param more concise

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/spatial/   (props changed)
    lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java

Modified: lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java?rev=1386860&r1=1386859&r2=1386860&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java (original)
+++ lucene/dev/branches/branch_4x/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java Mon Sep 17 21:44:43 2012
@@ -58,36 +58,30 @@ public class PortedSolr3Test extends Str
 
     grid = new GeohashPrefixTree(ctx,12);
     strategy = new RecursivePrefixTreeStrategy(grid, "recursive_geohash");
-    ctorArgs.add(new Object[]{new Param(strategy, "recursive_geohash")});
+    ctorArgs.add(new Object[]{new Param(strategy)});
 
     grid = new QuadPrefixTree(ctx,25);
     strategy = new RecursivePrefixTreeStrategy(grid, "recursive_quad");
-    ctorArgs.add(new Object[]{new Param(strategy, "recursive_quad")});
+    ctorArgs.add(new Object[]{new Param(strategy)});
 
     grid = new GeohashPrefixTree(ctx,12);
     strategy = new TermQueryPrefixTreeStrategy(grid, "termquery_geohash");
-    ctorArgs.add(new Object[]{new Param(strategy, "termquery_geohash")});
+    ctorArgs.add(new Object[]{new Param(strategy)});
 
     strategy = new TwoDoublesStrategy(ctx, "twodoubles");
-    ctorArgs.add(new Object[]{new Param(strategy, "twodoubles")});
+    ctorArgs.add(new Object[]{new Param(strategy)});
 
     return ctorArgs;
   }
   
-  // this is a hack for clover!
+  // this is a hack for clover! (otherwise strategy.toString() used as file name)
   static class Param {
     SpatialStrategy strategy;
-    String description;
 
-    Param(SpatialStrategy strategy, String description) {
-      this.strategy = strategy;
-      this.description = description;
-    }
+    Param(SpatialStrategy strategy) { this.strategy = strategy; }
     
     @Override
-    public String toString() {
-      return description;
-    }
+    public String toString() { return strategy.getFieldName(); }
   }
 
 //  private String fieldName;