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

Add Boolean#parseBoolean to forbidden-apis #59190

Open
jaymode opened this issue Jul 7, 2020 · 2 comments
Open

Add Boolean#parseBoolean to forbidden-apis #59190

jaymode opened this issue Jul 7, 2020 · 2 comments
Labels
:Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team

Comments

@jaymode
Copy link
Member

jaymode commented Jul 7, 2020

In #22200, existing boolean parsing was made strict so that:

"true" is converted to the boolean value true, "false" is converted to the boolean value false. Everything else raises an error.

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 to true 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.

@jaymode jaymode added :Core/Infra/Core Core issues without another label team-discuss labels Jul 7, 2020
@elasticmachine
Copy link
Collaborator

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

@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Jul 7, 2020
@rjernst
Copy link
Member

rjernst commented Jul 7, 2020

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.

@rjernst rjernst added the needs:triage Requires assignment of a team area label label Dec 3, 2020
@pgomulka pgomulka removed the needs:triage Requires assignment of a team area label label Dec 10, 2020
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 Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

No branches or pull requests

4 participants