Remove unnecessary boxing and use of deprecated Double ctors

This commit is contained in:
Ryan Ernst 2016-05-23 13:44:59 -07:00
parent a862feab6b
commit ef435d0099
3 changed files with 3 additions and 3 deletions

View File

@ -340,7 +340,7 @@ public class GeoDistanceRangeQueryBuilder extends AbstractQueryBuilder<GeoDistan
fromValue = geoDistance.normalize(fromValue, DistanceUnit.DEFAULT);
}
} else {
fromValue = new Double(0);
fromValue = 0.0;
}
if (to != null) {

View File

@ -243,7 +243,7 @@ public class FunctionScoreTests extends ESTestCase {
private static final ScoreFunction RANDOM_SCORE_FUNCTION = new RandomScoreFunction(0, 0, new IndexFieldDataStub());
private static final ScoreFunction FIELD_VALUE_FACTOR_FUNCTION = new FieldValueFactorFunction("test", 1,
FieldValueFactorFunction.Modifier.LN, new Double(1), null);
FieldValueFactorFunction.Modifier.LN, 1.0, null);
private static final ScoreFunction GAUSS_DECAY_FUNCTION = new DecayFunctionBuilder.NumericFieldDataScoreFunction(0, 1, 0.1, 0,
GaussDecayFunctionBuilder.GAUSS_DECAY_FUNCTION, new IndexNumericFieldDataStub(), MultiValueMode.MAX);
private static final ScoreFunction EXP_DECAY_FUNCTION = new DecayFunctionBuilder.NumericFieldDataScoreFunction(0, 1, 0.1, 0,

View File

@ -122,7 +122,7 @@ public class DateScriptMocks {
@Override
public double runAsDouble() {
return new DateTime(new Double((double) vars.get("_value")).longValue(), DateTimeZone.UTC).plusMonths(1).getMillis();
return new DateTime(Double.valueOf((double) vars.get("_value")).longValue(), DateTimeZone.UTC).plusMonths(1).getMillis();
}
@Override