From 2cbfdb7f00c21ea2cf609f8e79be1b0bd72225bd Mon Sep 17 00:00:00 2001 From: David Wayne Smiley Date: Mon, 17 Sep 2012 21:43:56 +0000 Subject: [PATCH] Make Param more concise git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1386859 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/spatial/PortedSolr3Test.java | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java b/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java index e8ac18975dc..ae39a1adee6 100644 --- a/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java +++ b/lucene/spatial/src/test/org/apache/lucene/spatial/PortedSolr3Test.java @@ -58,36 +58,30 @@ public class PortedSolr3Test extends StrategyTestCase { 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;