Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Information Provided
-
3.1.2
-
None
-
None
-
JDK 21 GA
Maven 3.9.4
junit-jupiter 5.10.0
maven-surefire-plugin 3.1.2
maven-compiler-plugin 3.11.0
Description
When running a test class that makes use of JEP 443, surefire reports an Error, despite being run with --enable-preview.
[ERROR] Illegal field name "" in class com.example.Demo
Example:
class Demo { @Test public void test() { Function<Object, Integer> foo = _ -> 1; // ... } }
It is worth noting, that compiler:3.11.0:testCompile completes just fine.
The maven-compiler-plugin requires <compilerArg>--enable-preview</compilerArg> and maven-surefire-plugin require <argLine>-enable-preview</argLine>.
Attachments
Issue Links
- is related to
-
MCOMPILER-546 Maven compiling fails when using JEP 443
- Closed