Correctly parse property name in path "map[key[foo]]"#21855
Merged
jhoeller merged 1 commit intospring-projects:masterfrom Apr 2, 2019
Merged
Correctly parse property name in path "map[key[foo]]"#21855jhoeller merged 1 commit intospring-projects:masterfrom
jhoeller merged 1 commit intospring-projects:masterfrom
Conversation
Contributor
Author
|
The Codacy check fails because the |
Contributor
Author
|
@jhoeller any chance you will assign this issue to the |
Contributor
|
On review, I'll rather make this a 5.2 topic since the bean property binding is a high-risk area for regressions. Even if some such paths are not meant to be valid from our side, people may encounter e.g. property paths with incomplete nested brackets which we would possibly parse differently then. |
jhoeller
added a commit
that referenced
this pull request
Apr 2, 2019
This was referenced Sep 30, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have a
Beanthat contains aMap. In thisMapwe want to save properties with property names which contain an index that is relevant for our application only, likekey5[foo]. For spring that index doesn't matter, it should just treatkey5[foo]as property name.However spring-bean is not able to correctly retrieve the property name, it tries to retrieve
key5[foo(missing square bracket at the end). That's because spring just looks for the first occurrence of]and thinks it's the closing square bracket of the property name, however in our case that square bracket is part of the property name, and the relevant square bracket for spring (to actually close the property name) comes afterwards.Would be nice if this could be backported to
5.1.x.Thanks!