Skip to content
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

Move more XContent.createParser calls to non-deprecated version #28670

Merged
merged 2 commits into from
Feb 14, 2018

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Feb 13, 2018

This moves more of the callers to pass in the DeprecationHandler.

Relates to #28504

This moves more of the callers to pass in the DeprecationHandler.

Relates to elastic#28504
Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I found a few things.

@@ -96,7 +97,7 @@
aggregationParser.declareObject(SignificantTermsAggregationBuilder::significanceHeuristic,
(p, context) -> {
SignificanceHeuristicParser significanceHeuristicParser = significanceHeuristicParserRegistry
.lookupReturningNullIfNotFound(name);
.lookupReturningNullIfNotFound(name, LoggingDeprecationHandler.INSTANCE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be p.getDeprecationHandler().

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops yeah, I missed that p was a parser

@@ -111,7 +112,7 @@
PARSER.declareObject(SignificantTextAggregationBuilder::significanceHeuristic,
(p, context) -> {
SignificanceHeuristicParser significanceHeuristicParser = significanceHeuristicParserRegistry
.lookupReturningNullIfNotFound(name);
.lookupReturningNullIfNotFound(name, LoggingDeprecationHandler.INSTANCE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now

@@ -402,7 +403,8 @@ public static MovAvgPipelineAggregationBuilder parse(
factory.predict(predict);
}
if (model != null) {
MovAvgModel.AbstractModelParser modelParser = movingAverageMdelParserRegistry.lookup(model, parser.getTokenLocation());
MovAvgModel.AbstractModelParser modelParser = movingAverageMdelParserRegistry.lookup(model,
parser.getTokenLocation(), LoggingDeprecationHandler.INSTANCE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parser.getDeprecationHandler()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, good catch

@dakrone
Copy link
Member Author

dakrone commented Feb 13, 2018

Thanks for looking @nik9000, I pushed a commit

@dakrone dakrone merged commit 7c1f5f5 into elastic:master Feb 14, 2018
dakrone added a commit that referenced this pull request Feb 14, 2018
* Move more XContent.createParser calls to non-deprecated version

This moves more of the callers to pass in the DeprecationHandler.

Relates to #28504

* Use parser's deprecation handler where available
@dakrone dakrone deleted the xc-createparser-1 branch February 14, 2018 16:57
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants