ThreadSafe is not a valid checker name

Open Beginner friendly
#4,833 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
tooling

Research direction

Start with ThreadSafeChecker.java and inspect how checker names are registered in BuiltInCheckerSuppliers.java. Reproduce the reported Maven command, register the checker under ThreadSafe, and confirm that compilation accepts -Xep:ThreadSafe:WARN without reporting an invalid checker name.

Written by the indexing model from the issue text.

Description

In v2.36.0, https://errorprone.info/bugpattern/ThreadSafe seems to have an implementation in ThreadSafeChecker.java by the advertised name, but it cannot be activated by either name:

$ ./mvnw clean test-compile -DepFlags='-XepDisableAllChecks -Xep:ThreadSafe:WARN'
[INFO] Scanning for projects...
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.12.1:compile (default-compile) on project example: Fatal error compiling: ThreadSafe is not a valid checker name -> [Help 1]

I think this is because it is not named in BuiltInCheckerSuppliers.java (and never has been).

Dominant language
Java
Stars
7.2k
Forks
821
Avg merge
17h 27m
Merged PRs (30d)
45

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google/error-prone

All issues in google/error-prone

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.