-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Convert Ruby Integer and PositiveInteger settings classes to Java #17460
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
Conversation
This pull request does not have a backport label. Could you fix it @andsel? 🙏
|
|
500ee82
to
0e99a1a
Compare
|
0e99a1a
to
7edc640
Compare
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.
This looks correct, would it be possible to add some tests to cover our coerce
logic for doing String -> PositiveInt
?
|
💚 Build Succeeded
History
cc @andsel |
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.
Thanks for the additional tests!
Recently elastic#17460 the implementation for integer/postive integer settings was moved from jruby to pure java. The ruby implementation was leinient with whitespace in string values. This commit updates the java implementation to replicate this by stripping whitespace from string values before trying to parse them as int.
Recently #17460 the implementation for integer/postive integer settings was moved from jruby to pure java. The ruby implementation was leinient with whitespace in string values. This commit updates the java implementation to replicate this by stripping whitespace from string values before trying to parse them as int.
Release notes
[rn:skip]
What does this PR do?
Convert the Ruby settings classes Integer and PositiveInteger to Java, renaming them to SettingInteger and SettingPositiveInteger.
Why is it important/What is the impact to the user?
As a developer I want all the settings hierarchy to be implemented in a statically typed language, Java.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files (and/or docker env variables)Author's Checklist
How to test this PR locally
Related issues