Skip to content

Apache Lucene open-source search software

LUCENE-3795 removed seemingly needless catch of a Exception to merely log it. FWIW Tests pass.

David Wayne Smileyf2b7adab38ff
diff --git a/modules/spatial/src/java/org/apache/lucene/spatial/vector/TwoDoublesStrategy.java b/modules/spatial/src/java/org/apache/lucene/spatial/vector/TwoDoublesStrategy.java
index 1880a0cb221..1b2ec51cbf3 100644
--- a/modules/spatial/src/java/org/apache/lucene/spatial/vector/TwoDoublesStrategy.java
+++ b/modules/spatial/src/java/org/apache/lucene/spatial/vector/TwoDoublesStrategy.java
@@ -160,22 +160,17 @@ public class TwoDoublesStrategy extends SpatialStrategy<TwoDoublesFieldInfo> {
throw new UnsupportedSpatialOperation(args.getOperation());
}
- try {
- if( valueSource != null ) {
- valueSource = new CachingDoubleValueSource(valueSource);
- }
- else {
- valueSource = makeValueSource(args, fieldInfo);
- }
- Query spatialRankingQuery = new FunctionQuery(valueSource);
- BooleanQuery bq = new BooleanQuery();
- bq.add(spatial,BooleanClause.Occur.MUST);
- bq.add(spatialRankingQuery,BooleanClause.Occur.MUST);
- return bq;
- } catch(Exception ex) {
- log.warn("error making score", ex);
+ if( valueSource != null ) {
+ valueSource = new CachingDoubleValueSource(valueSource);
}
- return spatial;
+ else {
+ valueSource = makeValueSource(args, fieldInfo);
+ }
+ Query spatialRankingQuery = new FunctionQuery(valueSource);
+ BooleanQuery bq = new BooleanQuery();
+ bq.add(spatial,BooleanClause.Occur.MUST);
+ bq.add(spatialRankingQuery,BooleanClause.Occur.MUST);
+ return bq;
}
/**