- changed status to resolved
OPAL-Validate Integration Tests (OPAL-Validate/it:test) fails due to a LambdaExpressionWriting Bug
Issue #158
resolved
When we run the test suite on Java 10, the test suite aborts due to lambda rewritings in constructors which end up with wrong names such as: "$forward$<init>". Please note, that we will have the same problem with static initializers "<clinit>" that contain lambda expression. I suggest that we replace: "<init>" by "$$initializer$$" and "<clinit>" by "$$static_initializer$$"
BTW: I doubt that it is a Java 10 specific issue; I think it just showed up in Java 10.
[info] behavior of rewritten JCG lambda_expressions project
[info][class file reader] information about class files synthesized at parsing time is removed
[info][class file reader] the control-flow is simplified
[info][class file reader] control flow simplifications are not logged
[info][class file reader] invokedynamics using LambdaMetaFactory are rewritten
[info][class file reader] rewrites of LambdaMetaFactory based invokedynamics are not logged
[info][class file reader] unknown invokedynamics are logged
[info][project configuration] the JDK is part of the analysis
[info][project setup] computing type hierarchy took 0,0514 s
[info][project setup] computing overriding information took 0,2020 s
[info][project setup] computing defined methods took 0,3703 s
[info][project configuration] project validation revealed 0 significant issues
[info][project setup] validating the project took 0,0011 s
[info][project setup] creating the project took 0,4276 s
Reporter completed abruptly with an exception after receiving event: SuiteAborted(Ordinal(0, 1349),Illegal method name "$forward$<init>" in class app/ExpressionPrinter,InvokedynamicRewritingTest,org.opalj.br.InvokedynamicRewritingTest,Some(InvokedynamicRewritingTest),Some(java.lang.ClassFormatError: Illegal method name "$forward$<init>" in class app/ExpressionPrinter),Some(1450),Some(IndentedText(org.opalj.br.InvokedynamicRewritingTest,Illegal method name "$forward$<init>" in class app/ExpressionPrinter,0)),Some(SeeStackDepthException),None,None,pool-13-thread-4,1531744620778).
java.lang.RuntimeException: unexpected event [SuiteAborted(Ordinal(0, 1349),Illegal method name "$forward$<init>" in class app/ExpressionPrinter,InvokedynamicRewritingTest,org.opalj.br.InvokedynamicRewritingTest,Some(InvokedynamicRewritingTest),Some(java.lang.ClassFormatError: Illegal method name "$forward$<init>" in class app/ExpressionPrinter),Some(1450),Some(IndentedText(org.opalj.br.InvokedynamicRewritingTest,Illegal method name "$forward$<init>" in class app/ExpressionPrinter,0)),Some(SeeStackDepthException),None,None,pool-13-thread-4,1531744620778)]
at org.scalatest.tools.JUnitXmlReporter.unexpected(JUnitXmlReporter.scala:494)
at org.scalatest.tools.JUnitXmlReporter.processTest(JUnitXmlReporter.scala:332)
at org.scalatest.tools.JUnitXmlReporter.getTestsuite(JUnitXmlReporter.scala:166)
at org.scalatest.tools.JUnitXmlReporter.writeSuiteFile(JUnitXmlReporter.scala:76)
at org.scalatest.tools.JUnitXmlReporter.apply(JUnitXmlReporter.scala:62)
at org.scalatest.DispatchReporter$Propagator.$anonfun$run$10(DispatchReporter.scala:249)
at org.scalatest.DispatchReporter$Propagator.$anonfun$run$10$adapted(DispatchReporter.scala:248)
at scala.collection.immutable.List.foreach(List.scala:389)
at org.scalatest.DispatchReporter$Propagator.run(DispatchReporter.scala:248)
at java.base/java.lang.Thread.run(Thread.java:844)
[info] org.opalj.br.InvokedynamicRewritingTest *** ABORTED ***
[info] java.lang.ClassFormatError: Illegal method name "$forward$<init>" in class app/ExpressionPrinter
[info] at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[info] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1009)
[info] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:870)
[info] at org.opalj.ba.ProjectBasedInMemoryClassLoader.findClass(ProjectBasedClassLoader.scala:26)
[info] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
[info] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
[info] at org.opalj.br.InvokedynamicRewritingTest.$anonfun$new$9(InvokedynamicRewritingTest.scala:104)
[info] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[info] at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
[info] at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
[info] ...
[error] java.lang.ClassFormatError: Illegal method name "$forward$<init>" in class app/ExpressionPrinter
[error] at java.base/java.lang.ClassLoader.defineClass1(Native Method)
[error] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1009)
[error] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:870)
[error] at org.opalj.ba.ProjectBasedInMemoryClassLoader.findClass(ProjectBasedClassLoader.scala:26)
[error] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
[error] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
[error] at org.opalj.br.InvokedynamicRewritingTest.$anonfun$new$9(InvokedynamicRewritingTest.scala:104)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
Comments (2)
-
reporter -
reporter - removed version
Removing version: 1.1.0 (automated comment)
- Log in to comment
resolved by commit #6213c187e1f8140d52798ba80ae63ed124683f40