-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoSuchMethodError: com.sun.tools.javac.code.Symbol$CompletionFailure.getDetailValue()Ljava/lang/Object #1529
Comments
+1, this occurred to me as well when I tried to resolve dependency issues in bazel BUILD file, and it's very difficult to figure out which dependency is missing with this issue. Edit: I figured out the dependency issue which was because of missing junit. A repro might be feasible if we do the following:
|
It's not specifically related to the Error Prone javac, the return type changed in JDK 10: openjdk/jdk@75831b7#diff-88e6b6b2c67a08c7dd41fb7f1e2d729d235adc12ac3e2b1092b67a0b49b6af70L2181-R2167 |
A quick win would be to just stop invoking the method for the logging statement, given the problems. |
Fixes #1529 PiperOrigin-RevId: 350615883
Fixes #1529 PiperOrigin-RevId: 350615883
Thanks for the fix! |
Fixes google#1529 PiperOrigin-RevId: 350646165
Description of the problem:
There appears to be a return type discrepancy between the ErrorProne JDK that it compiles against, versus OpenJDK. The class is com.sun.tools.javac.code.Symbol. The inner class is CompletionFailure.
Errorprone JDK: CompletionFailure.getDetailValue
OpenJDK: CompletionFailure.getDetailValue
This discrepancy is leading me to see this during a Bazel build when ErrorProne is invoked:
This is during a logging statement that is about to tell me there is a missing transitive dependency:
Error prone logging statement
Can we eliminate the use of that method in the logging statement, as it seems problematic?
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Mac with OpenJDK 11 + Bazel 1.2.1
JDK 11 is set as the server_javabase, host_javabase, and javabase if you are familiar with Bazel.
I haven't figured out the repro because Bazel fails just as it is about to explain the use case. It has something to do with an upstream transitive dependency being missing, but I have tried to create a simple example and have not found one yet. This original case came from a missing dependency in a big project. Adding that missing dependency worked around this issue, but we had to guess as to what that dependency was until we found it.
What version of Error Prone are you using?
Bazel 1.2.1 / ErrorProne 2.3.3
Have you found anything relevant by searching the web?
No.
The text was updated successfully, but these errors were encountered: