Skip to content

Commit af87035

Browse files
nizarbenallajddarcy
authored andcommitted
8355746: Start of release updates for JDK 26
8355748: Add SourceVersion.RELEASE_26 8355751: Add source 26 and target 26 to javac Co-authored-by: Joe Darcy <[email protected]> Reviewed-by: iris, coleenp, darcy
1 parent c59e44a commit af87035

File tree

60 files changed

+1814
-90
lines changed

Some content is hidden

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

60 files changed

+1814
-90
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=25
4+
version=26
55

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

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=25
29+
DEFAULT_VERSION_FEATURE=26
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=2025-09-16
37-
DEFAULT_VERSION_CLASSFILE_MAJOR=69 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
36+
DEFAULT_VERSION_DATE=2026-03-17
37+
DEFAULT_VERSION_CLASSFILE_MAJOR=70 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
3838
DEFAULT_VERSION_CLASSFILE_MINOR=0
3939
DEFAULT_VERSION_DOCS_API_SINCE=11
40-
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="24 25"
41-
DEFAULT_JDK_SOURCE_TARGET_VERSION=25
40+
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="24 25 26"
41+
DEFAULT_JDK_SOURCE_TARGET_VERSION=26
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
@@ -154,6 +154,8 @@
154154

155155
#define JAVA_25_VERSION 69
156156

157+
#define JAVA_26_VERSION 70
158+
157159
void ClassFileParser::set_class_bad_constant_seen(short bad_constant) {
158160
assert((bad_constant == JVM_CONSTANT_Module ||
159161
bad_constant == JVM_CONSTANT_Package) && _major_version >= JAVA_9_VERSION,

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,14 @@ default List<VerifyError> verify(Path path) throws IOException {
10301030
*/
10311031
int JAVA_25_VERSION = 69;
10321032

1033+
/**
1034+
* The class major version introduced by Java SE 26, {@value}.
1035+
*
1036+
* @see ClassFileFormatVersion#RELEASE_26
1037+
* @since 26
1038+
*/
1039+
int JAVA_26_VERSION = 70;
1040+
10331041
/**
10341042
* A minor version number {@value} indicating a class uses preview features
10351043
* of a Java SE release since 12, for major versions {@value
@@ -1041,7 +1049,7 @@ default List<VerifyError> verify(Path path) throws IOException {
10411049
* {@return the latest class major version supported by the current runtime}
10421050
*/
10431051
static int latestMajorVersion() {
1044-
return JAVA_25_VERSION;
1052+
return JAVA_26_VERSION;
10451053
}
10461054

10471055
/**

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,18 @@ public enum ClassFileFormatVersion {
371371
* <cite>The Java Virtual Machine Specification, Java SE 25 Edition</cite></a>
372372
*/
373373
RELEASE_25(69),
374+
375+
/**
376+
* The version introduced by the Java Platform, Standard Edition
377+
* 26.
378+
*
379+
* @since 26
380+
*
381+
* @see <a
382+
* href="https://docs.oracle.com/javase/specs/jvms/se26/html/index.html">
383+
* <cite>The Java Virtual Machine Specification, Java SE 26 Edition</cite></a>
384+
*/
385+
RELEASE_26(70),
374386
; // Reduce code churn when appending new constants
375387

376388
// Note to maintainers: when adding constants for newer releases,
@@ -386,7 +398,7 @@ private ClassFileFormatVersion(int major) {
386398
* {@return the latest class file format version}
387399
*/
388400
public static ClassFileFormatVersion latest() {
389-
return RELEASE_25;
401+
return RELEASE_26;
390402
}
391403

392404
/**

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,18 @@ public enum SourceVersion {
468468
* JEP 513: Flexible Constructor Bodies</a>
469469
*/
470470
RELEASE_25,
471+
472+
/**
473+
* The version introduced by the Java Platform, Standard Edition
474+
* 26.
475+
*
476+
* @since 26
477+
*
478+
* @see <a
479+
* href="https://docs.oracle.com/javase/specs/jls/se26/html/index.html">
480+
* <cite>The Java Language Specification, Java SE 26 Edition</cite></a>
481+
*/
482+
RELEASE_26,
471483
; // Reduce code churn when appending new constants
472484

473485
// Note that when adding constants for newer releases, the
@@ -477,7 +489,7 @@ public enum SourceVersion {
477489
* {@return the latest source version that can be modeled}
478490
*/
479491
public static SourceVersion latest() {
480-
return RELEASE_25;
492+
return RELEASE_26;
481493
}
482494

483495
private static final SourceVersion latestSupported = getLatestSupported();
@@ -492,7 +504,7 @@ public static SourceVersion latest() {
492504
private static SourceVersion getLatestSupported() {
493505
int intVersion = Runtime.version().feature();
494506
return (intVersion >= 11) ?
495-
valueOf("RELEASE_" + Math.min(25, intVersion)):
507+
valueOf("RELEASE_" + Math.min(26, intVersion)):
496508
RELEASE_10;
497509
}
498510

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, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2025, 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_25)
47+
@SupportedSourceVersion(RELEASE_26)
4848
public abstract class AbstractAnnotationValueVisitor14<R, P> extends AbstractAnnotationValueVisitor9<R, P> {
4949

5050
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2025, 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
@@ -50,7 +50,7 @@
5050
* @see AbstractAnnotationValueVisitor14
5151
* @since 23
5252
*/
53-
@SupportedSourceVersion(RELEASE_25)
53+
@SupportedSourceVersion(RELEASE_26)
5454
@PreviewFeature(feature=PreviewFeature.Feature.LANGUAGE_MODEL, reflective=true)
5555
public abstract class AbstractAnnotationValueVisitorPreview<R, P> extends AbstractAnnotationValueVisitor14<R, P> {
5656

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2025, 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
@@ -50,7 +50,7 @@
5050
* @see AbstractElementVisitor9
5151
* @since 16
5252
*/
53-
@SupportedSourceVersion(RELEASE_25)
53+
@SupportedSourceVersion(RELEASE_26)
5454
public abstract class AbstractElementVisitor14<R, P> extends AbstractElementVisitor9<R, P> {
5555
/**
5656
* Constructor for concrete subclasses to call.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2025, 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
@@ -53,7 +53,7 @@
5353
* @see AbstractElementVisitor14
5454
* @since 23
5555
*/
56-
@SupportedSourceVersion(RELEASE_25)
56+
@SupportedSourceVersion(RELEASE_26)
5757
@PreviewFeature(feature=PreviewFeature.Feature.LANGUAGE_MODEL, reflective=true)
5858
public abstract class AbstractElementVisitorPreview<R, P> extends AbstractElementVisitor14<R, P> {
5959
/**

0 commit comments

Comments
 (0)