Skip to content

Make classes+methods that can be static static in many spots#85370

Merged
original-brownbear merged 2 commits intoelastic:masterfrom
original-brownbear:fix-static-things
Mar 29, 2022
Merged

Make classes+methods that can be static static in many spots#85370
original-brownbear merged 2 commits intoelastic:masterfrom
original-brownbear:fix-static-things

Conversation

@original-brownbear
Copy link
Copy Markdown
Contributor

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 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 and it just generally makes the code easier to follow.

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.
@original-brownbear original-brownbear added :Core/Infra/Core Core issues without another label >refactoring v8.2.0 labels Mar 27, 2022
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Mar 27, 2022
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@original-brownbear
Copy link
Copy Markdown
Contributor Author

Jenkins run elasticsearch-ci/packaging-tests-windows-sample (random Jenkins issue)

1 similar comment
@original-brownbear
Copy link
Copy Markdown
Contributor Author

Jenkins run elasticsearch-ci/packaging-tests-windows-sample (random Jenkins issue)

@original-brownbear
Copy link
Copy Markdown
Contributor Author

Jenkins run elasticsearch-ci/packaging-tests-windows-sample

@rjernst
Copy link
Copy Markdown
Member

rjernst commented Mar 29, 2022

I skimmed this, and the premise seems good as long as it compiles and tests pass. LGTM.

@original-brownbear
Copy link
Copy Markdown
Contributor Author

Thanks Ryan!

@original-brownbear original-brownbear merged commit 898d849 into elastic:master Mar 29, 2022
@original-brownbear original-brownbear deleted the fix-static-things branch March 29, 2022 22:21
@original-brownbear original-brownbear restored the fix-static-things branch April 18, 2023 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Core Core issues without another label >refactoring Team:Core/Infra Meta label for core/infra team v8.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants