-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add Boolean#parseBoolean to forbidden-apis #59190
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
Comments
Pinging @elastic/es-core-infra (:Core/Infra/Core) |
It is unfortunate we let this lapse; a lot of work went into removing uses of lenient boolean parsing. It looks like most of the uses added are in tests, although there appear to be a couple that are user facing. +1 to adding the method to forbidden apis to stop the bleeding. |
Pinging @elastic/es-core-infra (Team:Core/Infra) |
Hi, I'm willing to contribute by working on this. Is that ok? I started looking into the places we need the |
Thanks @esousacosta , your contribution would be much appreciated. |
No problem, @mosche. Thank you for letting me know about the deprecation warning. I'll be on lookout here for more news on this matter, then. |
@esousacosta a decent first step here could be to:
Deprecation warnings are a bit more involved, we could discuss these in a follow up. Wdyt? |
Looks good to me as a plan, @mosche. I'll start on that and update the issue when I have news 👍 |
In #22200, existing boolean parsing was made strict so that:
However, usages of
Boolean.parseBoolean
have made their way into the codebase since then and the implementation of the JDKs boolean parsing logic is anything but strict as a string that is a case-insensitive match totrue
will be true and everything else will be false.I think we should remove these usages of
Boolean.parseBoolean
after deprecation in the places where it was previously used and add this API to our forbidden-apis list.The text was updated successfully, but these errors were encountered: