-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Update AbstractXContentParser to support parsers that don't provide text characters #129005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update AbstractXContentParser to support parsers that don't provide text characters #129005
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
Hi @Mikep86, I've created a changelog YAML for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I reverted the change and ran the test to confirm this fails as expected. Might want to add another to check the false
case too. Thanks for the fix!
libs/x-content/src/test/java/org/elasticsearch/xcontent/MapXContentParserTests.java
Show resolved
Hide resolved
@elasticmachine update branch |
@elasticmachine update branch |
…ext characters (elastic#129005) (cherry picked from commit 5ee6dfa)
…ext characters (elastic#129005) (cherry picked from commit 5ee6dfa)
…ext characters (elastic#129005) (cherry picked from commit 5ee6dfa)
…ext characters (elastic#129005) (cherry picked from commit 5ee6dfa)
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
Updates
AbstractXContentParser
to support parsers that don't provide text characters. Previously,AbstractXContentParser
assumed that all parsers implementedtextCharacters()
,textOffset()
, andtextLength()
, which isn't true.