Skip to content
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

Error compiling #1883

Closed
markathomas opened this issue Oct 23, 2020 · 2 comments
Closed

Error compiling #1883

markathomas opened this issue Oct 23, 2020 · 2 comments

Comments

@markathomas
Copy link

ATTENTION! Please read and follow:

Description of the problem / feature request:

Compiling application

Feature requests: what underlying problem are you trying to solve with this feature?

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

What version of Error Prone are you using?

2.3.4

Have you found anything relevant by searching the web?

/data/git/boxview-cwp-vaadin14/src/main/java/com/webit360/boxview/ui/MainView.java:178:66
java: An unhandled exception was thrown by the Error Prone static analysis plugin.
     Please report this at https://github.com/google/error-prone/issues/new and include the following:
  
     error-prone version: 2.3.4
     BugPattern: UnnecessaryLambda
     Stack Trace:
     java.lang.LinkageError: com.sun.tools.javac.comp.Resolve.findIdent(com.sun.tools.javac.comp.Env,com.sun.tools.javac.util.Name,com.sun.tools.javac.code.Kinds$KindSelector)
  	at com.google.errorprone.util.FindIdentifiers.findIdent(FindIdentifiers.java:104)
  	at com.google.errorprone.fixes.SuggestedFixes.qualifyType(SuggestedFixes.java:289)
  	at com.google.errorprone.fixes.SuggestedFixes$5.visitClassType(SuggestedFixes.java:1082)
  	at com.google.errorprone.fixes.SuggestedFixes$5.visitClassType(SuggestedFixes.java:1065)
  	at jdk.compiler/com.sun.tools.javac.code.Type$ClassType.accept(Type.java:1010)
  	at com.google.errorprone.fixes.SuggestedFixes.prettyType(SuggestedFixes.java:1064)
  	at com.google.errorprone.bugpatterns.UnnecessaryLambda.lambda$lambdaToMethod$0(UnnecessaryLambda.java:220)
  	at com.google.common.collect.Streams$1.tryAdvance(Streams.java:259)
  	at java.base/java.util.Spliterator.forEachRemaining(Spliterator.java:326)
  	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
  	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
  	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
  	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
  	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
  	at com.google.errorprone.bugpatterns.UnnecessaryLambda.lambdaToMethod(UnnecessaryLambda.java:221)
  	at com.google.errorprone.bugpatterns.UnnecessaryLambda.matchVariable(UnnecessaryLambda.java:162)
  	at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:451)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitVariable(ErrorProneScanner.java:886)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitVariable(ErrorProneScanner.java:152)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:992)
  	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:72)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:46)
  	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)
  	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
  	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
  	at jdk.compiler/com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:187)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:550)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:152)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:823)
  	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:72)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:46)
  	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
  	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
  	at jdk.compiler/com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:144)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:562)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:152)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:603)
  	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:56)
  	at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:43)
  	at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:152)
  	at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1423)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1370)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:959)
  	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
  	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:147)
  	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
  	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
  	at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:231)
  	at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:498)
  	at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:350)
  	at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:274)
  	at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:228)
  	at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1441)
  	at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1100)
  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1224)
  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:1066)
  	at org.jetbrains.jps.incremental.IncProjectBuilder.access$1200(IncProjectBuilder.java:67)
  	at org.jetbrains.jps.incremental.IncProjectBuilder$BuildParallelizer$1.run(IncProjectBuilder.java:1006)
  	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
  	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
  	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
  	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
  	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184)
  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
  	at java.base/java.lang.Thread.run(Thread.java:832)
  Caused by: java.lang.NoSuchMethodException: com.sun.tools.javac.comp.Resolve.findIdent(com.sun.tools.javac.comp.Env,com.sun.tools.javac.util.Name,com.sun.tools.javac.code.Kinds$KindSelector)
  	at java.base/java.lang.Class.getDeclaredMethod(Class.java:2553)
  	at com.google.errorprone.util.FindIdentifiers.findIdent(FindIdentifiers.java:98)
  	... 69 more
@tbroyer
Copy link
Contributor

tbroyer commented Oct 24, 2020

Duplicate of #1432

@tbroyer
Copy link
Contributor

tbroyer commented Oct 24, 2020

TL;DR: use JDK 11, or find a way to upgrade Error Prone to 2.4.0 (the plugin for IntelliJ IDEA has been fixed, but not yet released: https://youtrack.jetbrains.com/issue/IDEA-253080, JetBrains/intellij-plugins@0fa5230), or disable Error Prone in IntelliJ IDEA (and only use it from your build tool)

@eaftan eaftan closed this as completed Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants