-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
9
-
x86_64
-
linux_ubuntu
FULL PRODUCT VERSION :
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+140)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+140, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Ubuntu 14.04.5 LTS
A DESCRIPTION OF THE PROBLEM :
When compiling code that compiles fine on JDK 8, the current JDK 9 EA build throws an AssertionError:
An exception has occurred in the compiler (9-ea). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.AssertionError
at com.sun.tools.javac.comp.LambdaToMethod.setVarargsIfNeeded(jdk.compiler@9-ea/LambdaToMethod.java:795)
at com.sun.tools.javac.comp.LambdaToMethod.access$1900(jdk.compiler@9-ea/LambdaToMethod.java:81)
at com.sun.tools.javac.comp.LambdaToMethod$MemberReferenceToLambda.expressionInvoke(jdk.compiler@9-ea/LambdaToMethod.java:971)
at com.sun.tools.javac.comp.LambdaToMethod$MemberReferenceToLambda.lambda(jdk.compiler@9-ea/LambdaToMethod.java:845)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitReference(jdk.compiler@9-ea/LambdaToMethod.java:1502)
at com.sun.tools.javac.tree.JCTree$JCMemberReference.accept(jdk.compiler@9-ea/JCTree.java:2170)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:70)
at com.sun.tools.javac.tree.TreeTranslator.visitApply(jdk.compiler@9-ea/TreeTranslator.java:280)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitApply(jdk.compiler@9-ea/LambdaToMethod.java:1252)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(jdk.compiler@9-ea/JCTree.java:1614)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitSelect(jdk.compiler@9-ea/TreeTranslator.java:357)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitSelect(jdk.compiler@9-ea/LambdaToMethod.java:1528)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(jdk.compiler@9-ea/JCTree.java:2090)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitApply(jdk.compiler@9-ea/TreeTranslator.java:279)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitApply(jdk.compiler@9-ea/LambdaToMethod.java:1252)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(jdk.compiler@9-ea/JCTree.java:1614)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitSelect(jdk.compiler@9-ea/TreeTranslator.java:357)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitSelect(jdk.compiler@9-ea/LambdaToMethod.java:1528)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(jdk.compiler@9-ea/JCTree.java:2090)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitApply(jdk.compiler@9-ea/TreeTranslator.java:279)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitApply(jdk.compiler@9-ea/LambdaToMethod.java:1252)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(jdk.compiler@9-ea/JCTree.java:1614)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitSelect(jdk.compiler@9-ea/TreeTranslator.java:357)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitSelect(jdk.compiler@9-ea/LambdaToMethod.java:1528)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(jdk.compiler@9-ea/JCTree.java:2090)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitApply(jdk.compiler@9-ea/TreeTranslator.java:279)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitApply(jdk.compiler@9-ea/LambdaToMethod.java:1252)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(jdk.compiler@9-ea/JCTree.java:1614)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitSelect(jdk.compiler@9-ea/TreeTranslator.java:357)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitSelect(jdk.compiler@9-ea/LambdaToMethod.java:1528)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(jdk.compiler@9-ea/JCTree.java:2090)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitApply(jdk.compiler@9-ea/TreeTranslator.java:279)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitApply(jdk.compiler@9-ea/LambdaToMethod.java:1252)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(jdk.compiler@9-ea/JCTree.java:1614)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitReturn(jdk.compiler@9-ea/TreeTranslator.java:263)
at com.sun.tools.javac.tree.JCTree$JCReturn.accept(jdk.compiler@9-ea/JCTree.java:1526)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:70)
at com.sun.tools.javac.tree.TreeTranslator.visitBlock(jdk.compiler@9-ea/TreeTranslator.java:167)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitBlock(jdk.compiler@9-ea/LambdaToMethod.java:1275)
at com.sun.tools.javac.tree.JCTree$JCBlock.accept(jdk.compiler@9-ea/JCTree.java:1000)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitMethodDef(jdk.compiler@9-ea/TreeTranslator.java:150)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitMethodDef(jdk.compiler@9-ea/LambdaToMethod.java:1408)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(jdk.compiler@9-ea/JCTree.java:852)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:70)
at com.sun.tools.javac.tree.TreeTranslator.visitClassDef(jdk.compiler@9-ea/TreeTranslator.java:139)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitClassDef(jdk.compiler@9-ea/LambdaToMethod.java:1317)
at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(jdk.compiler@9-ea/JCTree.java:760)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.analyzeAndPreprocessClass(jdk.compiler@9-ea/LambdaToMethod.java:1241)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.access$300(jdk.compiler@9-ea/LambdaToMethod.java:1193)
at com.sun.tools.javac.comp.LambdaToMethod.visitClassDef(jdk.compiler@9-ea/LambdaToMethod.java:239)
at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(jdk.compiler@9-ea/JCTree.java:760)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.comp.LambdaToMethod.translate(jdk.compiler@9-ea/LambdaToMethod.java:204)
at com.sun.tools.javac.comp.LambdaToMethod.translate(jdk.compiler@9-ea/LambdaToMethod.java:197)
at com.sun.tools.javac.comp.LambdaToMethod.translateTopLevelClass(jdk.compiler@9-ea/LambdaToMethod.java:224)
at com.sun.tools.javac.main.JavaCompiler.desugar(jdk.compiler@9-ea/JavaCompiler.java:1555)
at com.sun.tools.javac.main.JavaCompiler.desugar(jdk.compiler@9-ea/JavaCompiler.java:1432)
at com.sun.tools.javac.main.JavaCompiler.compile(jdk.compiler@9-ea/JavaCompiler.java:976)
at com.sun.tools.javac.api.JavacTaskImpl$1.call(jdk.compiler@9-ea/JavacTaskImpl.java:104)
at com.sun.tools.javac.api.JavacTaskImpl$1.call(jdk.compiler@9-ea/JavacTaskImpl.java:100)
at com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(jdk.compiler@9-ea/JavacTaskImpl.java:135)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(jdk.compiler@9-ea/JavacTaskImpl.java:100)
at com.sun.tools.javac.api.JavacTaskImpl.call(jdk.compiler@9-ea/JavacTaskImpl.java:94)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:46)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:33)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:99)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:52)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:209)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:190)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:135)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:535)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:163)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:123)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:32)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:113)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
at org.gradle.initialization.DefaultGradleLauncher$RunTasksAction.execute(DefaultGradleLauncher.java:256)
at org.gradle.initialization.DefaultGradleLauncher$RunTasksAction.execute(DefaultGradleLauncher.java:253)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:175)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:49)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:31)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9-ea/ThreadPoolExecutor.java:1161)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9-ea/ThreadPoolExecutor.java:635)
at java.lang.Thread.run(java.base@9-ea/Thread.java:843)
REGRESSION. Last worked in version 8u121
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile https://github.com/junit-team/junit5/tree/issues/jdk9-compilation-failure using javac .
-- in our case via gradle:
./gradlew :junit-jupiter-params:build
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compiled class files
ACTUAL -
AssertionError
REPRODUCIBILITY :
This bug can be reproduced always.
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+140)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+140, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Ubuntu 14.04.5 LTS
A DESCRIPTION OF THE PROBLEM :
When compiling code that compiles fine on JDK 8, the current JDK 9 EA build throws an AssertionError:
An exception has occurred in the compiler (9-ea). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.AssertionError
at com.sun.tools.javac.comp.LambdaToMethod.setVarargsIfNeeded(jdk.compiler@9-ea/LambdaToMethod.java:795)
at com.sun.tools.javac.comp.LambdaToMethod.access$1900(jdk.compiler@9-ea/LambdaToMethod.java:81)
at com.sun.tools.javac.comp.LambdaToMethod$MemberReferenceToLambda.expressionInvoke(jdk.compiler@9-ea/LambdaToMethod.java:971)
at com.sun.tools.javac.comp.LambdaToMethod$MemberReferenceToLambda.lambda(jdk.compiler@9-ea/LambdaToMethod.java:845)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitReference(jdk.compiler@9-ea/LambdaToMethod.java:1502)
at com.sun.tools.javac.tree.JCTree$JCMemberReference.accept(jdk.compiler@9-ea/JCTree.java:2170)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:70)
at com.sun.tools.javac.tree.TreeTranslator.visitApply(jdk.compiler@9-ea/TreeTranslator.java:280)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitApply(jdk.compiler@9-ea/LambdaToMethod.java:1252)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(jdk.compiler@9-ea/JCTree.java:1614)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitSelect(jdk.compiler@9-ea/TreeTranslator.java:357)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitSelect(jdk.compiler@9-ea/LambdaToMethod.java:1528)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(jdk.compiler@9-ea/JCTree.java:2090)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitApply(jdk.compiler@9-ea/TreeTranslator.java:279)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitApply(jdk.compiler@9-ea/LambdaToMethod.java:1252)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(jdk.compiler@9-ea/JCTree.java:1614)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitSelect(jdk.compiler@9-ea/TreeTranslator.java:357)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitSelect(jdk.compiler@9-ea/LambdaToMethod.java:1528)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(jdk.compiler@9-ea/JCTree.java:2090)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitApply(jdk.compiler@9-ea/TreeTranslator.java:279)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitApply(jdk.compiler@9-ea/LambdaToMethod.java:1252)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(jdk.compiler@9-ea/JCTree.java:1614)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitSelect(jdk.compiler@9-ea/TreeTranslator.java:357)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitSelect(jdk.compiler@9-ea/LambdaToMethod.java:1528)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(jdk.compiler@9-ea/JCTree.java:2090)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitApply(jdk.compiler@9-ea/TreeTranslator.java:279)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitApply(jdk.compiler@9-ea/LambdaToMethod.java:1252)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(jdk.compiler@9-ea/JCTree.java:1614)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitSelect(jdk.compiler@9-ea/TreeTranslator.java:357)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitSelect(jdk.compiler@9-ea/LambdaToMethod.java:1528)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(jdk.compiler@9-ea/JCTree.java:2090)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitApply(jdk.compiler@9-ea/TreeTranslator.java:279)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitApply(jdk.compiler@9-ea/LambdaToMethod.java:1252)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(jdk.compiler@9-ea/JCTree.java:1614)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitReturn(jdk.compiler@9-ea/TreeTranslator.java:263)
at com.sun.tools.javac.tree.JCTree$JCReturn.accept(jdk.compiler@9-ea/JCTree.java:1526)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:70)
at com.sun.tools.javac.tree.TreeTranslator.visitBlock(jdk.compiler@9-ea/TreeTranslator.java:167)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitBlock(jdk.compiler@9-ea/LambdaToMethod.java:1275)
at com.sun.tools.javac.tree.JCTree$JCBlock.accept(jdk.compiler@9-ea/JCTree.java:1000)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.visitMethodDef(jdk.compiler@9-ea/TreeTranslator.java:150)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitMethodDef(jdk.compiler@9-ea/LambdaToMethod.java:1408)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(jdk.compiler@9-ea/JCTree.java:852)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:70)
at com.sun.tools.javac.tree.TreeTranslator.visitClassDef(jdk.compiler@9-ea/TreeTranslator.java:139)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.visitClassDef(jdk.compiler@9-ea/LambdaToMethod.java:1317)
at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(jdk.compiler@9-ea/JCTree.java:760)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.analyzeAndPreprocessClass(jdk.compiler@9-ea/LambdaToMethod.java:1241)
at com.sun.tools.javac.comp.LambdaToMethod$LambdaAnalyzerPreprocessor.access$300(jdk.compiler@9-ea/LambdaToMethod.java:1193)
at com.sun.tools.javac.comp.LambdaToMethod.visitClassDef(jdk.compiler@9-ea/LambdaToMethod.java:239)
at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(jdk.compiler@9-ea/JCTree.java:760)
at com.sun.tools.javac.tree.TreeTranslator.translate(jdk.compiler@9-ea/TreeTranslator.java:58)
at com.sun.tools.javac.comp.LambdaToMethod.translate(jdk.compiler@9-ea/LambdaToMethod.java:204)
at com.sun.tools.javac.comp.LambdaToMethod.translate(jdk.compiler@9-ea/LambdaToMethod.java:197)
at com.sun.tools.javac.comp.LambdaToMethod.translateTopLevelClass(jdk.compiler@9-ea/LambdaToMethod.java:224)
at com.sun.tools.javac.main.JavaCompiler.desugar(jdk.compiler@9-ea/JavaCompiler.java:1555)
at com.sun.tools.javac.main.JavaCompiler.desugar(jdk.compiler@9-ea/JavaCompiler.java:1432)
at com.sun.tools.javac.main.JavaCompiler.compile(jdk.compiler@9-ea/JavaCompiler.java:976)
at com.sun.tools.javac.api.JavacTaskImpl$1.call(jdk.compiler@9-ea/JavacTaskImpl.java:104)
at com.sun.tools.javac.api.JavacTaskImpl$1.call(jdk.compiler@9-ea/JavacTaskImpl.java:100)
at com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(jdk.compiler@9-ea/JavacTaskImpl.java:135)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(jdk.compiler@9-ea/JavacTaskImpl.java:100)
at com.sun.tools.javac.api.JavacTaskImpl.call(jdk.compiler@9-ea/JavacTaskImpl.java:94)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:46)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:33)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:99)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:52)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:209)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:190)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:135)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:535)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:163)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:123)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:32)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:113)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
at org.gradle.initialization.DefaultGradleLauncher$RunTasksAction.execute(DefaultGradleLauncher.java:256)
at org.gradle.initialization.DefaultGradleLauncher$RunTasksAction.execute(DefaultGradleLauncher.java:253)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:175)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:49)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:31)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9-ea/ThreadPoolExecutor.java:1161)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9-ea/ThreadPoolExecutor.java:635)
at java.lang.Thread.run(java.base@9-ea/Thread.java:843)
REGRESSION. Last worked in version 8u121
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile https://github.com/junit-team/junit5/tree/issues/jdk9-compilation-failure using javac .
-- in our case via gradle:
./gradlew :junit-jupiter-params:build
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compiled class files
ACTUAL -
AssertionError
REPRODUCIBILITY :
This bug can be reproduced always.
- duplicates
-
JDK-8171993 AssertionError when compiling method reference with generic code and varargs.
- Closed