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

Deprecate camelCase settings magic #17875

Merged
merged 1 commit into from
Apr 21, 2016
Merged

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Apr 20, 2016

Looking up settings currently falls back to adjusting the setting key to
camelCase, and then looking at the parsed settings keys again. This adds
deprecation logging to that case. While in 5.0 settings validation will
handle most of these cases, there stills exists some code (eg analysis
providers) which lookup settings directly on the Settings object.

see #8988

Looking up settings currently falls back to adjusting the setting key to
camelCase, and then looking at the parsed settings keys again. This adds
deprecation logging to that case. While in 5.0 settings validation will
handle most of these cases, there stills exists some code (eg analysis
providers) which lookup settings directly on the Settings object.

see elastic#8988
@nik9000
Copy link
Member

nik9000 commented Apr 20, 2016

LGTM

String camelKey = toCamelCase(key);
if (key.equals(camelKey)) {
return null;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't need to compare keys here and could just rely on the lookup returning a non-null value?

@jpountz
Copy link
Contributor

jpountz commented Apr 20, 2016

LGTM

@clintongormley clintongormley added :Core/Infra/Settings Settings infrastructure and APIs >deprecation labels Apr 20, 2016
@rjernst rjernst merged commit dfff338 into elastic:2.x Apr 21, 2016
rjernst added a commit that referenced this pull request Apr 21, 2016
Deprecate camelCase settings magic
@rjernst rjernst deleted the camel_settings branch April 21, 2016 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants