Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
2c0bfb76
Commit
2c0bfb76
authored
Dec 21, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.3.x' into 2.4.x
Closes gh-24578
parents
af67e6fa
4a3ce0c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
MeterValue.java
...mework/boot/actuate/autoconfigure/metrics/MeterValue.java
+3
-2
MeterValueTests.java
...k/boot/actuate/autoconfigure/metrics/MeterValueTests.java
+2
-2
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterValue.java
View file @
2c0bfb76
...
...
@@ -108,6 +108,7 @@ public final class MeterValue {
* Return a new {@link MeterValue} instance for the given double value.
* @param value the source value
* @return a {@link MeterValue} instance
* @since 2.3.0
*/
public
static
MeterValue
valueOf
(
double
value
)
{
return
new
MeterValue
(
value
);
...
...
@@ -115,9 +116,9 @@ public final class MeterValue {
private
static
Double
safeParseDouble
(
String
value
)
{
try
{
return
Double
.
parseDouble
(
value
);
return
Double
.
valueOf
(
value
);
}
catch
(
NumberFormatException
nfe
)
{
catch
(
NumberFormatException
ex
)
{
return
null
;
}
}
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterValueTests.java
View file @
2c0bfb76
...
...
@@ -42,8 +42,8 @@ class MeterValueTests {
@Test
void
getValueForDistributionSummaryWhenFromNumberStringShouldReturnDoubleValue
()
{
MeterValue
meterValue
=
MeterValue
.
valueOf
(
"123"
);
assertThat
(
meterValue
.
getValue
(
Type
.
DISTRIBUTION_SUMMARY
)).
isEqualTo
(
123
);
MeterValue
meterValue
=
MeterValue
.
valueOf
(
"123
.42
"
);
assertThat
(
meterValue
.
getValue
(
Type
.
DISTRIBUTION_SUMMARY
)).
isEqualTo
(
123
.42
);
}
@Test
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment