Skip to content

Add Boolean#parseBoolean to forbidden-apis #59190

@jaymode

Description

@jaymode

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Core/Infra/CoreCore issues without another labelTeam:Core/InfraMeta label for core/infra teamgood first issuelow hanging fruittriagedIssue has been looked at, and is being left open

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions