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
1a0f2198
Commit
1a0f2198
authored
Jul 17, 2017
by
Madhura Bhave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
Fixes gh-3832
parent
00430ac2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
NoUnboundElementsBindHandler.java
...properties/bind/handler/NoUnboundElementsBindHandler.java
+1
-1
ConfigurationPropertiesBindingPostProcessorTests.java
...ies/ConfigurationPropertiesBindingPostProcessorTests.java
+2
-1
No files found.
spring-boot/src/main/java/org/springframework/boot/context/properties/bind/handler/NoUnboundElementsBindHandler.java
View file @
1a0f2198
...
@@ -77,7 +77,7 @@ public class NoUnboundElementsBindHandler extends AbstractBindHandler {
...
@@ -77,7 +77,7 @@ public class NoUnboundElementsBindHandler extends AbstractBindHandler {
BindContext
context
)
{
BindContext
context
)
{
Set
<
ConfigurationProperty
>
unbound
=
new
TreeSet
<>();
Set
<
ConfigurationProperty
>
unbound
=
new
TreeSet
<>();
for
(
ConfigurationPropertySource
source
:
context
.
getSources
())
{
for
(
ConfigurationPropertySource
source
:
context
.
getSources
())
{
if
(
this
.
filter
.
apply
(
source
))
{
if
(
source
instanceof
IterableConfigurationPropertySource
&&
this
.
filter
.
apply
(
source
))
{
collectUnbound
(
name
,
unbound
,
collectUnbound
(
name
,
unbound
,
(
IterableConfigurationPropertySource
)
source
);
(
IterableConfigurationPropertySource
)
source
);
}
}
...
...
spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessorTests.java
View file @
1a0f2198
...
@@ -48,6 +48,7 @@ import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
...
@@ -48,6 +48,7 @@ import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.MutablePropertySources
;
import
org.springframework.core.env.MutablePropertySources
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.core.env.SystemEnvironmentPropertySource
;
import
org.springframework.core.env.SystemEnvironmentPropertySource
;
import
org.springframework.mock.env.MockEnvironment
;
import
org.springframework.mock.env.MockEnvironment
;
import
org.springframework.test.context.support.TestPropertySourceUtils
;
import
org.springframework.test.context.support.TestPropertySourceUtils
;
...
@@ -426,7 +427,7 @@ public class ConfigurationPropertiesBindingPostProcessorTests {
...
@@ -426,7 +427,7 @@ public class ConfigurationPropertiesBindingPostProcessorTests {
MutablePropertySources
propertySources
=
env
.
getPropertySources
();
MutablePropertySources
propertySources
=
env
.
getPropertySources
();
propertySources
.
addFirst
(
new
MapPropertySource
(
"test"
,
propertySources
.
addFirst
(
new
MapPropertySource
(
"test"
,
Collections
.
singletonMap
(
"com.example.foo"
,
5
)));
Collections
.
singletonMap
(
"com.example.foo"
,
5
)));
propertySources
.
addLast
(
new
SystemEnvironmentPropertySource
(
"system"
,
propertySources
.
addLast
(
new
SystemEnvironmentPropertySource
(
StandardEnvironment
.
SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME
,
Collections
.
singletonMap
(
"COM_EXAMPLE_OTHER"
,
"10"
)));
Collections
.
singletonMap
(
"COM_EXAMPLE_OTHER"
,
"10"
)));
this
.
context
.
register
(
TestConfiguration
.
class
);
this
.
context
.
register
(
TestConfiguration
.
class
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
...
...
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