jamesfredley commented on code in PR #16732:
URL: https://github.com/apache/grails-core/pull/16732#discussion_r4365443589
##########
grails-bootstrap/src/main/groovy/org/grails/config/NavigableMap.groovy:
##########
@@ -151,11 +198,17 @@ class NavigableMap implements Map<String, Object>,
Cloneable {
if (parseFlatKeys) {
String[] keyParts = sourceKey.split(/\./)
if (keyParts.length > 1) {
- mergeMapEntry(rootMap, path, targetMap, sourceKey,
sourceValue, parseFlatKeys)
+ if (!path) {
Review Comment:
`merge([a: ['rows[0].name': 'row']], true)` used to build `a.rows` as
`[[name: 'row']]`. Skipping `mergeMapEntry` when the path is not empty also
skips the subscript handling. Both `get('a.rows')` and `navigate('a', 'rows')`
are now null, and the map holds an `a.rows[0]` block. The same merge at the
previous head returned the list.
Keep the indexed-container construction. Only skip the redundant dotted
alias. Please cover `getProperty('a.rows', List)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]