You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correction, errorprone is on the module path, not class path, but so are all the other JARs. I don't have a choice because my library uses Java Modules and if I try running with <useModulePath>false</useModulePath> I get an error in my own module-info.java. In any case, I don't think this is the source of the problem.
If guava or the annotation JAR is placed on the module-path then the project must explicitly add requires static com.google.errorprone.annotations to its module-info; otherwise, the compiler will behave as if the class cannot be found (when in fact, it can be). You don't need to explicitly add errorprone as a dependency because guava should already do that for you (it is a transitive compile-time dependency).
Another workaround, for anyone wanting to try something different, is to add -Xlint:classfile. This will suppress these kind of warnings.
Description
As a follow-up for #2721, I am getting this problem using JDK 22, -Werror, and -Wlint:all
I tried adding:
but it did not help. I will include the maven -X (full debug) output for you to review.
This only seems to occur when compiling unit tests though.
default-compile
works fine butdefault-testCompile
failsbuild.log
As you can see at the end of the log, errorprone is on the compiler classpath, so I'm at a loss as to why this is failing.
Expected Behavior
No compiler warnings/errors
Actual Behavior
Compiler warnings/errors
Packages
No response
Platforms
No response
Checklist
The text was updated successfully, but these errors were encountered: