-
Bug
-
Resolution: Duplicate
-
P4
-
19
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
openjdk version "19-ea" 2022-09-20
OpenJDK Runtime Environment (build 19-ea+25-1892)
OpenJDK 64-Bit Server VM (build 19-ea+25-1892, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
Code that compiles correctly with JDK 19 throws an exception at runtime:
Error: LinkageError occurred while loading main class examples.SimpleInterpreter
java.lang.ClassFormatError: Method $proxy$a in class examples/SimpleInterpreter has illegal modifiers: 0x1008
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
In terminal that has Java 19 EA, Maven and git:
- git clone https://github.com/Randgalt/expressive-java.git
- cd expressive-java
- git checkout jordanz/java19
- cd java-19
- mvn package
- java --enable-preview -cp target/classes examples.SimpleInterpreter
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output some results
ACTUAL -
Error: LinkageError occurred while loading main class examples.SimpleInterpreter
java.lang.ClassFormatError: Method $proxy$a in class examples/SimpleInterpreter has illegal modifiers: 0x1008
---------- BEGIN SOURCE ----------
See steps to reproduce
---------- END SOURCE ----------
FREQUENCY : always
openjdk version "19-ea" 2022-09-20
OpenJDK Runtime Environment (build 19-ea+25-1892)
OpenJDK 64-Bit Server VM (build 19-ea+25-1892, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
Code that compiles correctly with JDK 19 throws an exception at runtime:
Error: LinkageError occurred while loading main class examples.SimpleInterpreter
java.lang.ClassFormatError: Method $proxy$a in class examples/SimpleInterpreter has illegal modifiers: 0x1008
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
In terminal that has Java 19 EA, Maven and git:
- git clone https://github.com/Randgalt/expressive-java.git
- cd expressive-java
- git checkout jordanz/java19
- cd java-19
- mvn package
- java --enable-preview -cp target/classes examples.SimpleInterpreter
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output some results
ACTUAL -
Error: LinkageError occurred while loading main class examples.SimpleInterpreter
java.lang.ClassFormatError: Method $proxy$a in class examples/SimpleInterpreter has illegal modifiers: 0x1008
---------- BEGIN SOURCE ----------
See steps to reproduce
---------- END SOURCE ----------
FREQUENCY : always
- duplicates
-
JDK-8287808 javac generates illegal class file for pattern matching switch with records
- Resolved