Skip to content

Commit

Permalink
Move map population outside of process block
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Sep 4, 2015
1 parent 4386701 commit fe79c15
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ class YamlPropertySourceLoader extends YamlProcessor implements PropertySourceLo
resources = [resource] as Resource[]
def propertySource = new NavigableMap()
process { Properties properties, Map<String, Object> map ->
if(groovyConfigMap != null) {
propertySource.merge( groovyConfigMap.source, false )
}
propertySource.merge(map, false)
propertySource.merge(properties, false)
propertySource.putAll( propertySource.toFlatConfig() )
}
if(groovyConfigMap != null) {
propertySource.merge( groovyConfigMap.source, false )
}

if (!propertySource.isEmpty()) {
return new MapPropertySource(name, propertySource);
}
Expand Down

0 comments on commit fe79c15

Please sign in to comment.