Integrated: JDK-8292060: Make ClassFileVersionTest.java version adapting
Joe Darcy
darcy at openjdk.org
Tue Aug 9 17:59:18 UTC 2022
On Mon, 8 Aug 2022 19:30:22 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> The goal of this update is to allow ClassFileVersionTest.java to be modified less often while still testing class files of the latest version.
>
> Since the build policy of the JDK is to use the latest source and target, the class files in the java.base module will have the latest major version. By having the test file itself reference a preview API, its class file will have a nonzero minor version. (Simply compiling under "--enable-preview -source ${jdk.version}" is not sufficient to cause the minor version bits to be set.)
>
> As written, the test now only need to be updated when the referenced API goes non-preview as opposed needing to be updated for every feature release.
>
> After JDK-8289106 is fixed, setting latestMajor can be changed to something like
>
> ClassFileFormatVersion.latest().major()
This pull request has now been integrated.
Changeset: ae1a9a0b
Author: Joe Darcy <darcy at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/ae1a9a0b252fc9593b077f9626a431b0f06b3f51
Stats: 123 lines in 2 files changed: 17 ins; 93 del; 13 mod
8292060: Make ClassFileVersionTest.java version adapting
Reviewed-by: hseigel
-------------
PR: https://git.openjdk.org/jdk/pull/9796
More information about the hotspot-runtime-dev
mailing list