Skip to content

There is no detection for Locale.of #5278

@mihnita

Description

@mihnita

Error-prone has UnsafeLocaleUsage, detecting the use of the Locale constructors and Locale.toString.
https://errorprone.info/bugpattern/UnsafeLocaleUsage

All good...

But JDK 19 deprecated the constructors and added the static methods Locale.of:

The methods have the exact same problems as the constructors.
So it would be nice if error-prone would also detect them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions