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.
- blocks
-
JDK-8372831 [lworld] com/sun/jdi/EATests.java#id0 fails with --enable-preview
-
- Open
-
- relates to
-
CODETOOLS-7902707 user modules can be used only in othervm
-
- Resolved
-
-
JDK-8375069 [lworld] vmTestbase/nsk/jdi/Accessible/modifiers/modifiers001/TestDescription.java fails with --enable-preview
-
- Open
-
-
JDK-8377387 [lworld] SA test with hprof fails with --enable-preview
-
- Open
-
- links to
-
Review(master)
openjdk/jtreg/314