Make classes+methods that can be static static in many spots#85370
Merged
original-brownbear merged 2 commits intoelastic:masterfrom Mar 29, 2022
original-brownbear:fix-static-things
Merged
Make classes+methods that can be static static in many spots#85370original-brownbear merged 2 commits intoelastic:masterfrom original-brownbear:fix-static-things
original-brownbear merged 2 commits intoelastic:masterfrom
original-brownbear:fix-static-things
Conversation
Just some quick static analysis+fixing here. Not much in terms of code changes besides adding the `static` keywords with the exception of some simplifications to some of the search objects that don't need the search controller instance passed down in many spots. This was done mostly automatically by the IDE but some quick manual inspection shows quite a few spots where this should make things behave better via things like making lambdas non-capturing.
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
Contributor
Author
|
Jenkins run elasticsearch-ci/packaging-tests-windows-sample (random Jenkins issue) |
1 similar comment
Contributor
Author
|
Jenkins run elasticsearch-ci/packaging-tests-windows-sample (random Jenkins issue) |
Contributor
Author
|
Jenkins run elasticsearch-ci/packaging-tests-windows-sample |
Member
|
I skimmed this, and the premise seems good as long as it compiles and tests pass. LGTM. |
Contributor
Author
|
Thanks Ryan! |
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.
Just some quick static analysis+fixing here after seeing warnings about this stuff left and right for years :) Not much in terms of code changes besides adding the
statickeywords with the exception of some simplificationsto some of the search objects that don't need the search controller instance
passed down in many spots.
This was done mostly automatically by the IDE but some quick manual inspection shows
quite a few spots where this should make things behave better via things like making lambdas
non-capturing and it just generally makes the code easier to follow.