Test fails with following output:
error: invalid source release 22 with --enable-preview
(preview language features are only supported for release 23)
java.lang.RuntimeException: Could not compile TestValueOneByteWithZeroByte with source code import jdk.internal.vm.annotation.NullRestricted; public class TestValueOneByteWithZeroByte extends FieldAlignmentTest.ZeroByte { @NullRestricted FieldAlignmentTest.ValueOneByte v1;}
at jdk.test.lib.compiler.InMemoryJavaCompiler.compile(InMemoryJavaCompiler.java:189)
at FieldAlignmentTest.generateTests(FieldAlignmentTest.java:118)
at FieldAlignmentTest.main(FieldAlignmentTest.java:176)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1575)
This is due to a hard coded Java version number that doesn't match the new version number after a merge with mainline.
error: invalid source release 22 with --enable-preview
(preview language features are only supported for release 23)
java.lang.RuntimeException: Could not compile TestValueOneByteWithZeroByte with source code import jdk.internal.vm.annotation.NullRestricted; public class TestValueOneByteWithZeroByte extends FieldAlignmentTest.ZeroByte { @NullRestricted FieldAlignmentTest.ValueOneByte v1;}
at jdk.test.lib.compiler.InMemoryJavaCompiler.compile(InMemoryJavaCompiler.java:189)
at FieldAlignmentTest.generateTests(FieldAlignmentTest.java:118)
at FieldAlignmentTest.main(FieldAlignmentTest.java:176)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1575)
This is due to a hard coded Java version number that doesn't match the new version number after a merge with mainline.