The test like this
/*
* @test
* @enablePreview
* @run driver ${test.main.class}
*/
public class PreviewDriverTest {
Integer i;
public static void main(String[] args) throws Exception {
}
}
fails in valhalla repo because class is compiled with enable-preview while executed without this option.
Test fails with:
java.lang.UnsupportedClassVersionError: Preview features are not enabled for PreviewDriverTest (class file version 71.65535). Try running with '--enable-preview'
It doesn't use any Valhalla feature directly but has a field Integer and javac generates additional attributes because of this.
Fix isjust to pass --enable-preview to driver code.
The workaround is to don't run driver tests with enable preview.
/*
* @test
* @enablePreview
* @run driver ${test.main.class}
*/
public class PreviewDriverTest {
Integer i;
public static void main(String[] args) throws Exception {
}
}
fails in valhalla repo because class is compiled with enable-preview while executed without this option.
Test fails with:
java.lang.UnsupportedClassVersionError: Preview features are not enabled for PreviewDriverTest (class file version 71.65535). Try running with '--enable-preview'
It doesn't use any Valhalla feature directly but has a field Integer and javac generates additional attributes because of this.
Fix isjust to pass --enable-preview to driver code.
The workaround is to don't run driver tests with enable preview.
- relates to
-
CODETOOLS-7902707 user modules can be used only in othervm
-
- Resolved
-
- links to
-
Review(master)
openjdk/jtreg/314