8311172: Classfile.PREVIEW_MINOR_VERSION doesn't match that read from class files

Reviewed-by: asotona
This commit is contained in:
Chen Liang 2023-07-17 11:53:32 +00:00 committed by Adam Sotona
parent afcf8e4751
commit 3fb9d117e3
2 changed files with 65 additions and 1 deletions

View file

@ -690,7 +690,12 @@ public sealed interface Classfile
int JAVA_21_VERSION = 65;
int JAVA_22_VERSION = 66;
int PREVIEW_MINOR_VERSION = -1;
/**
* A minor version number indicating a class uses preview features
* of a Java SE version since 12, for major versions {@value
* #JAVA_12_VERSION} and above.
*/
int PREVIEW_MINOR_VERSION = 65535;
static int latestMajorVersion() {
return JAVA_22_VERSION;