Remove unnecessary boxing and use of deprecated Double ctors
This commit is contained in:
parent
a862feab6b
commit
ef435d0099
|
@ -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) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue