Skip to content

There is no detection for Locale.of #5278

Closed

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.

Activity

  1. Marcono1234 commented on Nov 4, 2025

    @Marcono1234
    Contributor

    Was this resolved by #5297 and should be closed now?

    (it seems the PR was not automatically linked to the issue because the PR wasn't exactly using the GitHub keyword)

  2. cushon commented on Nov 4, 2025

    @cushon
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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