Skip to content

Commit ac5a08a

Browse files
tobias-lippertphilwebb
authored andcommitted
Avoid redundant boxing
See gh-39259
1 parent 74a7fbe commit ac5a08a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterValue.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public static MeterValue valueOf(String value) {
9090
if (duration != null) {
9191
return new MeterValue(duration);
9292
}
93-
return new MeterValue(Double.valueOf(value));
93+
return new MeterValue(Double.parseDouble(value));
9494
}
9595

9696
/**

Diff for: spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesCharSequenceToObjectConverterTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static class CharSequenceToLongConverter implements Converter<CharSequence, Long
108108

109109
@Override
110110
public Long convert(CharSequence source) {
111-
return Long.valueOf(source.toString()) + 1;
111+
return Long.parseLong(source.toString()) + 1;
112112
}
113113

114114
}

Diff for: spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/CharSequenceToObjectConverterTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static class CharSequenceToLongConverter implements Converter<CharSequence, Long
104104

105105
@Override
106106
public Long convert(CharSequence source) {
107-
return Long.valueOf(source.toString()) + 1;
107+
return Long.parseLong(source.toString()) + 1;
108108
}
109109

110110
}

0 commit comments

Comments
 (0)