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
d72ba70c
Commit
d72ba70c
authored
May 11, 2018
by
Johnny Lim
Committed by
Stephane Nicoll
May 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use type parameter for Supplier in AggregateBinder.merge()
Closes gh-13139
parent
243023f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
AggregateBinder.java
...amework/boot/context/properties/bind/AggregateBinder.java
+2
-2
ArrayBinder.java
...ngframework/boot/context/properties/bind/ArrayBinder.java
+1
-1
CollectionBinder.java
...mework/boot/context/properties/bind/CollectionBinder.java
+2
-3
MapBinder.java
...ringframework/boot/context/properties/bind/MapBinder.java
+2
-3
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/AggregateBinder.java
View file @
d72ba70c
...
@@ -60,7 +60,7 @@ abstract class AggregateBinder<T> {
...
@@ -60,7 +60,7 @@ abstract class AggregateBinder<T> {
if
(
result
==
null
||
value
==
null
)
{
if
(
result
==
null
||
value
==
null
)
{
return
result
;
return
result
;
}
}
return
merge
(
value
,
(
T
)
result
);
return
merge
(
(
Supplier
<
T
>)
value
,
(
T
)
result
);
}
}
/**
/**
...
@@ -79,7 +79,7 @@ abstract class AggregateBinder<T> {
...
@@ -79,7 +79,7 @@ abstract class AggregateBinder<T> {
* @param additional the additional elements to merge
* @param additional the additional elements to merge
* @return the merged result
* @return the merged result
*/
*/
protected
abstract
T
merge
(
Supplier
<
?
>
existing
,
T
additional
);
protected
abstract
T
merge
(
Supplier
<
T
>
existing
,
T
additional
);
/**
/**
* Return the context being used by this binder.
* Return the context being used by this binder.
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/ArrayBinder.java
View file @
d72ba70c
...
@@ -56,7 +56,7 @@ class ArrayBinder extends IndexedElementsBinder<Object> {
...
@@ -56,7 +56,7 @@ class ArrayBinder extends IndexedElementsBinder<Object> {
}
}
@Override
@Override
protected
Object
merge
(
Supplier
<
?
>
existing
,
Object
additional
)
{
protected
Object
merge
(
Supplier
<
Object
>
existing
,
Object
additional
)
{
return
additional
;
return
additional
;
}
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/CollectionBinder.java
View file @
d72ba70c
...
@@ -55,10 +55,9 @@ class CollectionBinder extends IndexedElementsBinder<Collection<Object>> {
...
@@ -55,10 +55,9 @@ class CollectionBinder extends IndexedElementsBinder<Collection<Object>> {
}
}
@Override
@Override
@SuppressWarnings
(
"unchecked"
)
protected
Collection
<
Object
>
merge
(
Supplier
<
Collection
<
Object
>>
existing
,
protected
Collection
<
Object
>
merge
(
Supplier
<?>
existing
,
Collection
<
Object
>
additional
)
{
Collection
<
Object
>
additional
)
{
Collection
<
Object
>
existingCollection
=
(
Collection
<
Object
>)
existing
.
get
();
Collection
<
Object
>
existingCollection
=
existing
.
get
();
if
(
existingCollection
==
null
)
{
if
(
existingCollection
==
null
)
{
return
additional
;
return
additional
;
}
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/MapBinder.java
View file @
d72ba70c
...
@@ -83,10 +83,9 @@ class MapBinder extends AggregateBinder<Map<Object, Object>> {
...
@@ -83,10 +83,9 @@ class MapBinder extends AggregateBinder<Map<Object, Object>> {
}
}
@Override
@Override
@SuppressWarnings
(
"unchecked"
)
protected
Map
<
Object
,
Object
>
merge
(
Supplier
<
Map
<
Object
,
Object
>>
existing
,
protected
Map
<
Object
,
Object
>
merge
(
Supplier
<?>
existing
,
Map
<
Object
,
Object
>
additional
)
{
Map
<
Object
,
Object
>
additional
)
{
Map
<
Object
,
Object
>
existingMap
=
(
Map
<
Object
,
Object
>)
existing
.
get
();
Map
<
Object
,
Object
>
existingMap
=
existing
.
get
();
if
(
existingMap
==
null
)
{
if
(
existingMap
==
null
)
{
return
additional
;
return
additional
;
}
}
...
...
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