CSR :
|
|
Relates :
|
|
Relates :
|
Summary ------- Update core libraries for JDK 24 by adding an enum constant to `ClassFileFormatVersion` and constant to `ClassFile`. Problem ------- With a new release, `ClassFileFormatVersion` and `ClassFile` need a constants to model that release. Solution -------- Add the new constant. Specification ------------- diff --git a/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java b/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java index 16c57a9463e..72abe96a559 100644 --- a/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java +++ b/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -306,6 +306,18 @@ public enum ClassFileFormatVersion { * <cite>The Java Virtual Machine Specification, Java SE 23 Edition</cite></a> */ RELEASE_23(67), + + /** + * The version introduced by the Java Platform, Standard Edition + * 24. + * + * @since 24 + * + * @see <a + * href="https://docs.oracle.com/javase/specs/jvms/se24/html/index.html"> + * <cite>The Java Virtual Machine Specification, Java SE 24 Edition</cite></a> + */ + RELEASE_24(68), ; // Reduce code churn when appending new constants // Note to maintainers: when adding constants for newer releases, @@ -321,7 +333,7 @@ private ClassFileFormatVersion(int major) { * {@return the latest class file format version} */ public static ClassFileFormatVersion latest() { - return RELEASE_23; + return RELEASE_24; } /** --- a/src/java.base/share/classes/java/lang/classfile/ClassFile.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1478,6 +1478,12 @@ default List<VerifyError> verify(Path path) throws IOException { /** 67 */ int JAVA_23_VERSION = 67; + /** + * The class major version of JAVA_24. + * @since 24 + */ + int JAVA_24_VERSION = 68; +
|