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
b77a9c5a
Commit
b77a9c5a
authored
May 22, 2014
by
Christian Dupuis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove List.sort usage for Collections.sort
parent
0cbd0b60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
OrderedHealthAggregator.java
...ramework/boot/actuate/health/OrderedHealthAggregator.java
+3
-2
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java
View file @
b77a9c5a
...
...
@@ -18,6 +18,7 @@ package org.springframework.boot.actuate.health;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -61,13 +62,13 @@ public class OrderedHealthAggregator implements HealthAggregator {
return
Status
.
UNKOWN
;
}
status
.
sort
(
new
Comparator
<
Status
>()
{
Collections
.
sort
(
status
,
new
Comparator
<
Status
>()
{
@Override
public
int
compare
(
Status
s1
,
Status
s2
)
{
return
Integer
.
valueOf
(
OrderedHealthAggregator
.
this
.
statusOrder
.
indexOf
(
s1
.
getCode
())).
compareTo
(
Integer
.
valueOf
(
OrderedHealthAggregator
.
this
.
statusOrder
.
indexOf
(
s2
.
getCode
())));
Integer
.
valueOf
(
OrderedHealthAggregator
.
this
.
statusOrder
.
indexOf
(
s2
.
getCode
())));
}
});
...
...
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