Move more XContent.createParser calls to non-deprecated version#28672
Merged
dakrone merged 4 commits intoelastic:masterfrom Feb 14, 2018
Merged
Move more XContent.createParser calls to non-deprecated version#28672dakrone merged 4 commits intoelastic:masterfrom
dakrone merged 4 commits intoelastic:masterfrom
Conversation
Part 2 This moves more of the callers to pass in the DeprecationHandler. Relates to elastic#28504
nik9000
requested changes
Feb 13, 2018
Member
nik9000
left a comment
There was a problem hiding this comment.
Same deal as the other one. I think there are a few small things.
| } | ||
| return parser.contentType().xContent().createParser(parser.getXContentRegistry(), builder.map(body).bytes()); | ||
| return parser.contentType().xContent().createParser(parser.getXContentRegistry(), | ||
| LoggingDeprecationHandler.INSTANCE, builder.map(body).bytes()); |
Member
There was a problem hiding this comment.
parser.getDeprecationHandler()?
| builder.map(source); | ||
| try (XContentParser innerParser = parser.contentType().xContent().createParser(parser.getXContentRegistry(), builder.bytes())) { | ||
| try (XContentParser innerParser = parser.contentType().xContent() | ||
| .createParser(parser.getXContentRegistry(), LoggingDeprecationHandler.INSTANCE, builder.bytes())) { |
| // we need to convert | ||
| try (XContentParser parser = sourceXContentType.xContent().createParser(NamedXContentRegistry.EMPTY, doc.getSource()); | ||
| try (XContentParser parser = sourceXContentType.xContent() | ||
| .createParser(NamedXContentRegistry.EMPTY, LoggingDeprecationHandler.INSTANCE, doc.getSource()); |
Member
There was a problem hiding this comment.
I believe we can make this the throwing one because we just copy the structure.
Member
Author
There was a problem hiding this comment.
Yeah think so, since there isn't such a think as a deprecated field in the body of a document
Member
Author
|
Thanks again, I pushed another commit |
nik9000
approved these changes
Feb 13, 2018
dakrone
added a commit
that referenced
this pull request
Feb 14, 2018
* Move more XContent.createParser calls to non-deprecated version Part 2 This moves more of the callers to pass in the DeprecationHandler. Relates to #28504 * Use parser's deprecation handler where appropriate * Use logging handler in test that uses deprecated field on purpose
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Feb 15, 2018
* master: Backported synced-flush PR to v5.6.8 and v6.2.2 Move more XContent.createParser calls to non-deprecated version (elastic#28672) Move more XContent.createParser calls to non-deprecated version (elastic#28670) Build: Group archive and package distribution projects (elastic#28673) [DOCS] Add supported token filters [TEST] bump timeout in testFetchShardsSkipUnavailable to 5s Relax remote check for bwc project checkouts (elastic#28666) [TEST] Synchronize searcher list in IndexShardTests [TEST] packaging: function to collect debug info (elastic#28608) Compute declared versions in a static block Docs: Remove references to elasticsearch directory in plugins (elastic#28647) Remove snapshot conditional for bwc snapshots (elastic#28657) Removed redundant JSON object from Put Mapping docs (elastic#28514) Update threadpool.asciidoc target_response_time (elastic#28655)
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.
Part 2
This moves more of the callers to pass in the DeprecationHandler.
Relates to #28504