8296149: Start of release updates for JDK 21

8296150: Add SourceVersion.RELEASE_21
8296151: Add source 21 and target 21 to javac

Reviewed-by: dholmes, iris, erikj, vromero, jlahoda
This commit is contained in:
Joe Darcy 2022-12-08 16:04:00 +00:00 committed by Jesper Wilhelmsson
parent d562d3fcbe
commit 175e3d3ff3
70 changed files with 5338 additions and 54 deletions

View file

@ -262,7 +262,17 @@ public enum ClassFileFormatVersion {
* href="https://docs.oracle.com/javase/specs/jvms/se20/html/index.html">
* <cite>The Java Virtual Machine Specification, Java SE 20 Edition</cite></a>
*/
RELEASE_20(64);
RELEASE_20(64),
/**
* The version recognized by the Java Platform, Standard Edition
* 21.
*
* @see <a
* href="https://docs.oracle.com/javase/specs/jvms/se21/html/index.html">
* <cite>The Java Virtual Machine Specification, Java SE 21 Edition</cite></a>
*/
RELEASE_21(65);
// Note to maintainers: when adding constants for newer releases,
// the implementation of latest() must be updated too.
@ -277,7 +287,7 @@ public enum ClassFileFormatVersion {
* {@return the latest class file format version}
*/
public static ClassFileFormatVersion latest() {
return RELEASE_20;
return RELEASE_21;
}
/**