-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Remove usages of Set<CharSequence> #35501
Merged
Merged
Conversation
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
The javadocs of the CharSequence interface state that not all of its implementations define the general contracts of the Object#equals and Object#hashCode methods, therefore it is dangerous to use different CharSequence instances as elements in a set or as keys in a map. While we probably mostly use Strings in sets, in some places this is not enforced. To prevent this from accidentally happening, this change replaces all occurances of Set<CharSequence> which are currently mostly used in the completion suggester code with the more concrete usage of Set<String>.
cbuescher
added
>non-issue
:Search Relevance/Suggesters
"Did you mean" and suggestions as you type
v7.0.0
v6.6.0
labels
Nov 13, 2018
Pinging @elastic/es-search-aggs |
mayya-sharipova
approved these changes
Nov 15, 2018
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.
@cbuescher Thanks for the PR, good notice!
@mayya-sharipova thanks a lot for the review. |
cbuescher
pushed a commit
that referenced
this pull request
Nov 16, 2018
The javadocs of the CharSequence interface state that not all of its implementations define the general contracts of the Object#equals and Object#hashCode methods, therefore it is dangerous to use different CharSequence instances as elements in a set or as keys in a map. While we probably mostly use Strings in sets, in some places this is not enforced. To prevent this from accidentally happening, this change replaces all occurances of Set<CharSequence> which are currently mostly used in the completion suggester code with the more concrete usage of Set<String>.
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Nov 17, 2018
* master: (59 commits) SQL: Move internals from Joda to java.time (elastic#35649) Add HLRC docs for Get Lifecycle Policy (elastic#35612) Align RolloverStep's name with other step names (elastic#35655) Watcher: Use joda method to get local TZ (elastic#35608) Fix line length for org.elasticsearch.action.* files (elastic#35607) Remove use of AbstractComponent in server (elastic#35444) Deprecate types in count and msearch. (elastic#35421) Refactor an ambigious TermVectorsRequest constructor. (elastic#35614) [Scripting] Use Number as a return value for BucketAggregationScript (elastic#35653) Removes AbstractComponent from several classes (elastic#35566) [DOCS] Add beta warning to ILM pages. (elastic#35571) Deprecate types in validate query requests. (elastic#35575) Unmute BuildExamplePluginsIT Revert "AwaitsFix the RecoveryIT suite - see elastic#35597" Revert "[RCI] Check blocks while having index shard permit in TransportReplicationAction (elastic#35332)" Remove remaining line length violations for o.e.action.admin.cluster (elastic#35156) ML: Adjusing BWC version post backport to 6.6 (elastic#35605) [TEST] Replace fields in response with actual values Remove usages of CharSequence in Sets (elastic#35501) AwaitsFix the RecoveryIT suite - see elastic#35597 ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>non-issue
:Search Relevance/Suggesters
"Did you mean" and suggestions as you type
v6.6.0
v7.0.0-beta1
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.
The javadocs of the CharSequence interface state that not all of its
implementations define the general contracts of the Object#equals and
Object#hashCode methods, therefore it is dangerous to use different CharSequence
instances as elements in a set or as keys in a map.
While we probably mostly use Strings in those sets, in some places this is not enforced.
To prevent this from accidentally happening, this change replaces all occurances of
Set which are currently mostly used in the completion suggester code
with the more concrete usage of Set.