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
422a436d
Commit
422a436d
authored
Jul 08, 2018
by
dreis2211
Committed by
Stephane Nicoll
Aug 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish some Collectors
See gh-13727
parent
10c3c080
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
ExposeExcludePropertyEndpointFilter.java
...nfigure/endpoint/ExposeExcludePropertyEndpointFilter.java
+1
-2
MetricsEndpoint.java
...springframework/boot/actuate/metrics/MetricsEndpoint.java
+1
-1
AutoConfigurations.java
...pringframework/boot/autoconfigure/AutoConfigurations.java
+3
-4
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/ExposeExcludePropertyEndpointFilter.java
View file @
422a436d
...
@@ -20,7 +20,6 @@ import java.util.ArrayList;
...
@@ -20,7 +20,6 @@ import java.util.ArrayList;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.HashSet
;
import
java.util.Locale
;
import
java.util.Locale
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -83,7 +82,7 @@ public class ExposeExcludePropertyEndpointFilter<E extends ExposableEndpoint<?>>
...
@@ -83,7 +82,7 @@ public class ExposeExcludePropertyEndpointFilter<E extends ExposableEndpoint<?>>
return
Collections
.
emptySet
();
return
Collections
.
emptySet
();
}
}
return
items
.
stream
().
map
((
item
)
->
item
.
toLowerCase
(
Locale
.
ENGLISH
))
return
items
.
stream
().
map
((
item
)
->
item
.
toLowerCase
(
Locale
.
ENGLISH
))
.
collect
(
Collectors
.
to
Collection
(
HashSet:
:
new
));
.
collect
(
Collectors
.
to
Set
(
));
}
}
@Override
@Override
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/MetricsEndpoint.java
View file @
422a436d
...
@@ -158,7 +158,7 @@ public class MetricsEndpoint {
...
@@ -158,7 +158,7 @@ public class MetricsEndpoint {
private
<
K
,
V
,
T
>
List
<
T
>
asList
(
Map
<
K
,
V
>
map
,
BiFunction
<
K
,
V
,
T
>
mapper
)
{
private
<
K
,
V
,
T
>
List
<
T
>
asList
(
Map
<
K
,
V
>
map
,
BiFunction
<
K
,
V
,
T
>
mapper
)
{
return
map
.
entrySet
().
stream
()
return
map
.
entrySet
().
stream
()
.
map
((
entry
)
->
mapper
.
apply
(
entry
.
getKey
(),
entry
.
getValue
()))
.
map
((
entry
)
->
mapper
.
apply
(
entry
.
getKey
(),
entry
.
getValue
()))
.
collect
(
Collectors
.
to
Collection
(
ArrayList:
:
new
));
.
collect
(
Collectors
.
to
List
(
));
}
}
/**
/**
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurations.java
View file @
422a436d
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
package
org
.
springframework
.
boot
.
autoconfigure
;
package
org
.
springframework
.
boot
.
autoconfigure
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
...
@@ -48,11 +47,11 @@ public class AutoConfigurations extends Configurations implements Ordered {
...
@@ -48,11 +47,11 @@ public class AutoConfigurations extends Configurations implements Ordered {
@Override
@Override
protected
Collection
<
Class
<?>>
sort
(
Collection
<
Class
<?>>
classes
)
{
protected
Collection
<
Class
<?>>
sort
(
Collection
<
Class
<?>>
classes
)
{
List
<
String
>
names
=
classes
.
stream
().
map
(
Class:
:
getName
)
List
<
String
>
names
=
classes
.
stream
().
map
(
Class:
:
getName
)
.
collect
(
Collectors
.
to
Collection
(
ArrayList:
:
new
));
.
collect
(
Collectors
.
to
List
(
));
List
<
String
>
sorted
=
SORTER
.
getInPriorityOrder
(
names
);
List
<
String
>
sorted
=
SORTER
.
getInPriorityOrder
(
names
);
return
sorted
.
stream
()
return
sorted
.
stream
()
.
map
((
className
)
->
ClassUtils
.
resolveClassName
(
className
,
null
))
.
map
((
className
)
->
ClassUtils
.
resolveClassName
(
className
,
null
))
.
collect
(
Collectors
.
to
Collection
(
ArrayList:
:
new
));
.
collect
(
Collectors
.
to
List
(
));
}
}
@Override
@Override
...
...
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