Skip to content

Commit 519ecd3

Browse files
jddarcyJesperIRL
authored andcommitted
8319413: Start of release updates for JDK 23
8319414: Add SourceVersion.RELEASE_23 8319416: Add source 23 and target 23 to javac Reviewed-by: iris, erikj, alanb, vromero
1 parent 86f9b3f commit 519ecd3

File tree

98 files changed

+4872
-44
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+4872
-44
lines changed

.jcheck/conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[general]
22
project=jdk
33
jbs=JDK
4-
version=22
4+
version=23
55

66
[checks]
77
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists

make/conf/version-numbers.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
# Default version, product, and vendor information to use,
2727
# unless overridden by configure
2828

29-
DEFAULT_VERSION_FEATURE=22
29+
DEFAULT_VERSION_FEATURE=23
3030
DEFAULT_VERSION_INTERIM=0
3131
DEFAULT_VERSION_UPDATE=0
3232
DEFAULT_VERSION_PATCH=0
3333
DEFAULT_VERSION_EXTRA1=0
3434
DEFAULT_VERSION_EXTRA2=0
3535
DEFAULT_VERSION_EXTRA3=0
36-
DEFAULT_VERSION_DATE=2024-03-19
37-
DEFAULT_VERSION_CLASSFILE_MAJOR=66 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
36+
DEFAULT_VERSION_DATE=2024-09-17
37+
DEFAULT_VERSION_CLASSFILE_MAJOR=67 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
3838
DEFAULT_VERSION_CLASSFILE_MINOR=0
3939
DEFAULT_VERSION_DOCS_API_SINCE=11
40-
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="21 22"
41-
DEFAULT_JDK_SOURCE_TARGET_VERSION=22
40+
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="21 22 23"
41+
DEFAULT_JDK_SOURCE_TARGET_VERSION=23
4242
DEFAULT_PROMOTED_VERSION_PRE=ea

src/hotspot/share/classfile/classFileParser.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@
149149

150150
#define JAVA_22_VERSION 66
151151

152+
#define JAVA_23_VERSION 67
153+
152154
void ClassFileParser::set_class_bad_constant_seen(short bad_constant) {
153155
assert((bad_constant == JVM_CONSTANT_Module ||
154156
bad_constant == JVM_CONSTANT_Package) && _major_version >= JAVA_9_VERSION,

src/java.base/share/classes/java/lang/classfile/ClassFile.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,9 @@ default List<VerifyError> verify(Path path) throws IOException {
14751475
/** The class major version of JAVA_22. */
14761476
int JAVA_22_VERSION = 66;
14771477

1478+
/** 67 */
1479+
int JAVA_23_VERSION = 67;
1480+
14781481
/**
14791482
* A minor version number indicating a class uses preview features
14801483
* of a Java SE version since 12, for major versions {@value
@@ -1486,7 +1489,7 @@ default List<VerifyError> verify(Path path) throws IOException {
14861489
* {@return the latest major Java version}
14871490
*/
14881491
static int latestMajorVersion() {
1489-
return JAVA_22_VERSION;
1492+
return JAVA_23_VERSION;
14901493
}
14911494

14921495
/**

src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,18 @@ public enum ClassFileFormatVersion {
294294
* <cite>The Java Virtual Machine Specification, Java SE 22 Edition</cite></a>
295295
*/
296296
RELEASE_22(66),
297+
298+
/**
299+
* The version introduced by the Java Platform, Standard Edition
300+
* 23.
301+
*
302+
* @since 23
303+
*
304+
* @see <a
305+
* href="https://docs.oracle.com/javase/specs/jvms/se23/html/index.html">
306+
* <cite>The Java Virtual Machine Specification, Java SE 23 Edition</cite></a>
307+
*/
308+
RELEASE_23(67),
297309
; // Reduce code churn when appending new constants
298310

299311
// Note to maintainers: when adding constants for newer releases,
@@ -309,7 +321,7 @@ private ClassFileFormatVersion(int major) {
309321
* {@return the latest class file format version}
310322
*/
311323
public static ClassFileFormatVersion latest() {
312-
return RELEASE_22;
324+
return RELEASE_23;
313325
}
314326

315327
/**

src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public ClassReader(
226226
this.b = classFileBuffer;
227227
// Check the class' major_version. This field is after the magic and minor_version fields, which
228228
// use 4 and 2 bytes respectively.
229-
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V22) {
229+
if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V23) {
230230
throw new IllegalArgumentException(
231231
"Unsupported class file major version " + readShort(classFileOffset + 6));
232232
}

src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ public interface Opcodes {
312312
int V20 = 0 << 16 | 64;
313313
int V21 = 0 << 16 | 65;
314314
int V22 = 0 << 16 | 66;
315+
int V23 = 0 << 16 | 67;
315316

316317
/**
317318
* Version flag indicating that the class is using 'preview' features.

src/java.compiler/share/classes/javax/lang/model/SourceVersion.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,18 @@ public enum SourceVersion {
415415
* JEP 456: Unnamed Variables &amp; Patterns</a>
416416
*/
417417
RELEASE_22,
418+
419+
/**
420+
* The version introduced by the Java Platform, Standard Edition
421+
* 23.
422+
*
423+
* @since 23
424+
*
425+
* @see <a
426+
* href="https://docs.oracle.com/javase/specs/jls/se23/html/index.html">
427+
* <cite>The Java Language Specification, Java SE 23 Edition</cite></a>
428+
*/
429+
RELEASE_23,
418430
; // Reduce code churn when appending new constants
419431

420432
// Note that when adding constants for newer releases, the
@@ -424,7 +436,7 @@ public enum SourceVersion {
424436
* {@return the latest source version that can be modeled}
425437
*/
426438
public static SourceVersion latest() {
427-
return RELEASE_22;
439+
return RELEASE_23;
428440
}
429441

430442
private static final SourceVersion latestSupported = getLatestSupported();
@@ -439,7 +451,7 @@ public static SourceVersion latest() {
439451
private static SourceVersion getLatestSupported() {
440452
int intVersion = Runtime.version().feature();
441453
return (intVersion >= 11) ?
442-
valueOf("RELEASE_" + Math.min(22, intVersion)):
454+
valueOf("RELEASE_" + Math.min(23, intVersion)):
443455
RELEASE_10;
444456
}
445457

src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor14.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,7 @@
4444
* @see AbstractAnnotationValueVisitor9
4545
* @since 14
4646
*/
47-
@SupportedSourceVersion(RELEASE_22)
47+
@SupportedSourceVersion(RELEASE_23)
4848
public abstract class AbstractAnnotationValueVisitor14<R, P> extends AbstractAnnotationValueVisitor9<R, P> {
4949

5050
/**

src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor14.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* @see AbstractElementVisitor9
5151
* @since 16
5252
*/
53-
@SupportedSourceVersion(RELEASE_22)
53+
@SupportedSourceVersion(RELEASE_23)
5454
public abstract class AbstractElementVisitor14<R, P> extends AbstractElementVisitor9<R, P> {
5555
/**
5656
* Constructor for concrete subclasses to call.

0 commit comments

Comments
 (0)