forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor FilterXContentParser and DelegatingXContentParser (elastic#8…
…3457) We have two implementations of XContentParser that both delegate all of its methods to a delegate, either an inner parser provided at construction (FilterXContentParser) or a more dynamic variant that is returned by overriding the delegate method (DelegatingXContentParser). Effectively the two classes do exactly the same, the only difference being how the delegate parser is provided. While these two are two separate implementations, they could inherit from each other. With this change we make FilterXContentParser be the previous DelegatingXContentParser, that allows to override the delegate method, and we introduce a new FilterXContentParserWrapper that takes the fixed delegate as a constructor argument. Additionally, XContentSubParser is rewritten to extend FilterXContentParserWrapper.
- Loading branch information
1 parent
d4c1f92
commit 48da74f
Showing
10 changed files
with
98 additions
and
528 deletions.
There are no files selected for viewing
244 changes: 0 additions & 244 deletions
244
libs/x-content/src/main/java/org/elasticsearch/xcontent/DelegatingXContentParser.java
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.