Avoid redundant boxing

See gh-39259
This commit is contained in:
Tobias Lippert 2024-01-21 18:51:26 +01:00 committed by Phillip Webb
parent 74a7fbea9d
commit ac5a08a49b
3 changed files with 3 additions and 3 deletions

View File

@ -90,7 +90,7 @@ public final class MeterValue {
if (duration != null) {
return new MeterValue(duration);
}
return new MeterValue(Double.valueOf(value));
return new MeterValue(Double.parseDouble(value));
}
/**

View File

@ -108,7 +108,7 @@ class ConfigurationPropertiesCharSequenceToObjectConverterTests {
@Override
public Long convert(CharSequence source) {
return Long.valueOf(source.toString()) + 1;
return Long.parseLong(source.toString()) + 1;
}
}

View File

@ -104,7 +104,7 @@ class CharSequenceToObjectConverterTests {
@Override
public Long convert(CharSequence source) {
return Long.valueOf(source.toString()) + 1;
return Long.parseLong(source.toString()) + 1;
}
}