Java: language level 25 (IDEA-369743)

GitOrigin-RevId: b840dc633f13d96ac89efafcb823da0f09288990
This commit is contained in:
Bas Leijdekkers
2025-06-13 09:55:14 +02:00
committed by intellij-monorepo-bot
parent cdaae6b8bf
commit 6170d7d089
7 changed files with 151 additions and 8 deletions

View File

@@ -0,0 +1,134 @@
jdk.jfr.Throttle
jdk.jfr.Contextual
jdk.internal.classfile.impl.AbstractPoolEntry.Utf8EntryImpl#isFieldType(java.lang.constant.ClassDesc;)
jdk.internal.classfile.impl.AbstractPoolEntry.Utf8EntryImpl#isMethodType(java.lang.constant.MethodTypeDesc;)
jdk.internal.classfile.impl.AbstractPoolEntry.ClassEntryImpl#matches(java.lang.constant.ClassDesc;)
jdk.internal.classfile.impl.AbstractPoolEntry.PackageEntryImpl#matches(java.lang.constant.PackageDesc;)
jdk.internal.classfile.impl.AbstractPoolEntry.ModuleEntryImpl#matches(java.lang.constant.ModuleDesc;)
jdk.internal.classfile.impl.AbstractPoolEntry.MethodTypeEntryImpl#matches(java.lang.constant.MethodTypeDesc;)
jdk.internal.classfile.impl.AbstractPoolEntry.StringEntryImpl#equalsString(java.lang.String;)
jdk.internal.RequiresIdentity
java.io.Reader#readAllLines()
java.io.Reader#readAllAsString()
java.nio.CharBuffer#getChars(int;int;char[];int;)
java.lang.IO
java.lang.reflect.AccessFlag#maskToAccessFlags(int;java.lang.reflect.AccessFlag.Location;java.lang.reflect.ClassFileFormatVersion;)
java.lang.reflect.AccessFlag.Location#flagsMask()
java.lang.reflect.AccessFlag.Location#flagsMask(java.lang.reflect.ClassFileFormatVersion;)
java.lang.reflect.AccessFlag.Location#flags()
java.lang.reflect.AccessFlag.Location#flags(java.lang.reflect.ClassFileFormatVersion;)
java.lang.reflect.ClassFileFormatVersion#RELEASE_25
java.lang.Math#unsignedMultiplyExact(int;int;)
java.lang.Math#unsignedMultiplyExact(long;int;)
java.lang.Math#unsignedMultiplyExact(long;long;)
java.lang.Math#powExact(int;int;)
java.lang.Math#unsignedPowExact(int;int;)
java.lang.Math#powExact(long;int;)
java.lang.Math#unsignedPowExact(long;int;)
java.lang.classfile.constantpool.Utf8Entry#isFieldType(java.lang.constant.ClassDesc;)
java.lang.classfile.constantpool.Utf8Entry#isMethodType(java.lang.constant.MethodTypeDesc;)
java.lang.classfile.constantpool.ClassEntry#matches(java.lang.constant.ClassDesc;)
java.lang.classfile.constantpool.ModuleEntry#matches(java.lang.constant.ModuleDesc;)
java.lang.classfile.constantpool.StringEntry#equalsString(java.lang.String;)
java.lang.classfile.constantpool.PackageEntry#matches(java.lang.constant.PackageDesc;)
java.lang.classfile.constantpool.MethodTypeEntry#matches(java.lang.constant.MethodTypeDesc;)
java.lang.classfile.ClassFile#JAVA_25_VERSION
java.lang.StrictMath#unsignedMultiplyExact(int;int;)
java.lang.StrictMath#unsignedMultiplyExact(long;int;)
java.lang.StrictMath#unsignedMultiplyExact(long;long;)
java.lang.StrictMath#powExact(int;int;)
java.lang.StrictMath#unsignedPowExact(int;int;)
java.lang.StrictMath#powExact(long;int;)
java.lang.StrictMath#unsignedPowExact(long;int;)
java.lang.ScopedValue.Carrier
java.lang.ScopedValue.CallableOp
java.lang.ScopedValue
java.lang.StableValue
java.lang.CharSequence#getChars(int;int;char[];int;)
java.lang.StringBuffer#getChars(int;int;char[];int;)
java.util.zip.Deflater#close()
java.util.zip.Inflater#close()
java.util.concurrent.ForkJoinPool#schedule(java.lang.Runnable;long;java.util.concurrent.TimeUnit;)
java.util.concurrent.ForkJoinPool#schedule(java.util.concurrent.Callable<V>;long;java.util.concurrent.TimeUnit;)
java.util.concurrent.ForkJoinPool#scheduleAtFixedRate(java.lang.Runnable;long;long;java.util.concurrent.TimeUnit;)
java.util.concurrent.ForkJoinPool#scheduleWithFixedDelay(java.lang.Runnable;long;long;java.util.concurrent.TimeUnit;)
java.util.concurrent.ForkJoinPool#submitWithTimeout(java.util.concurrent.Callable<V>;long;java.util.concurrent.TimeUnit;java.util.function.Consumer<? super java.util.concurrent.ForkJoinTask<V>>;)
java.util.concurrent.ForkJoinPool#cancelDelayedTasksOnShutdown()
java.util.concurrent.ForkJoinPool#getDelayedTaskCount()
java.util.concurrent.StructuredTaskScope.Joiner
java.util.concurrent.StructuredTaskScope.Configuration
java.util.concurrent.StructuredTaskScope.FailedException
java.util.concurrent.StructuredTaskScope.TimeoutException
java.util.concurrent.StructuredTaskScope#open(java.util.concurrent.StructuredTaskScope.Joiner<? super T,? extends R>;java.util.function.Function<java.util.concurrent.StructuredTaskScope.Configuration,java.util.concurrent.StructuredTaskScope.Configuration>;)
java.util.concurrent.StructuredTaskScope#open(java.util.concurrent.StructuredTaskScope.Joiner<? super T,? extends R>;)
java.util.concurrent.StructuredTaskScope#open()
java.util.concurrent.StructuredTaskScope#fork(java.lang.Runnable;)
java.util.concurrent.StructuredTaskScope#join()
java.util.concurrent.StructuredTaskScope#isCancelled()
java.util.concurrent.StructuredTaskScopeImpl#fork(java.lang.Runnable;)
java.util.concurrent.StructuredTaskScopeImpl#join()
java.util.concurrent.StructuredTaskScopeImpl#isCancelled()
java.util.Currency#availableCurrencies()
java.util.TimeZone#availableIDs(int;)
java.util.TimeZone#availableIDs()
java.security.PEMRecord
java.security.PEMDecoder
java.security.PEMEncoder
java.security.DEREncodable
javax.net.ssl.ExtendedSSLSession#exportKeyingMaterialKey(java.lang.String;java.lang.String;byte[];int;)
javax.net.ssl.ExtendedSSLSession#exportKeyingMaterialData(java.lang.String;byte[];int;)
javax.crypto.spec.HKDFParameterSpec
javax.crypto.KDF
javax.crypto.KDFSpi
javax.crypto.KDFParameters
javax.crypto.EncryptedPrivateKeyInfo#encryptKey(java.security.PrivateKey;char[];java.lang.String;java.security.spec.AlgorithmParameterSpec;java.security.Provider;)
javax.crypto.EncryptedPrivateKeyInfo#encryptKey(java.security.PrivateKey;char[];)
javax.crypto.EncryptedPrivateKeyInfo#encryptKey(java.security.PrivateKey;java.security.Key;java.lang.String;java.security.spec.AlgorithmParameterSpec;java.security.Provider;java.security.SecureRandom;)
javax.crypto.EncryptedPrivateKeyInfo#getKey(char[];)
javax.crypto.EncryptedPrivateKeyInfo#getKey(java.security.Key;java.security.Provider;)
jdk.jshell.Snippet.SubKind#MODULE_IMPORT_SUBKIND
javax.sound.SoundClip
com.sun.tools.javac.tree.JCTree.JCImport#isModule()
com.sun.tools.javac.tree.JCTree.JCModuleImport#isModule()
com.sun.source.tree.ImportTree#isModule()
javax.lang.model.SourceVersion#RELEASE_25
jdk.internal.net.http.HttpResponseImpl#connectionLabel()
java.net.http.HttpResponse#connectionLabel()
java.net.http.HttpResponse.BodyHandlers#limiting(java.net.http.HttpResponse.BodyHandler<T>;long;)
java.net.http.HttpResponse.BodySubscribers#limiting(java.net.http.HttpResponse.BodySubscriber<T>;long;)
javax.xml.crypto.dsig.SignatureMethod#ECDSA_SHA3_224
javax.xml.crypto.dsig.SignatureMethod#ECDSA_SHA3_256
javax.xml.crypto.dsig.SignatureMethod#ECDSA_SHA3_384
javax.xml.crypto.dsig.SignatureMethod#ECDSA_SHA3_512
jdk.incubator.vector.Int64Vector.Int64Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Byte64Vector.Byte64Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Int128Vector.Int128Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Int256Vector.Int256Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Int512Vector.Int512Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.IntMaxVector.IntMaxShuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Long64Vector.Long64Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Byte128Vector.Byte128Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Byte256Vector.Byte256Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Byte512Vector.Byte512Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.ByteMaxVector.ByteMaxShuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Float64Vector.Float64Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Long128Vector.Long128Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Long256Vector.Long256Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Long512Vector.Long512Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.LongMaxVector.LongMaxShuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Short64Vector.Short64Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.VectorShuffle#fromMemorySegment(jdk.incubator.vector.VectorSpecies<E>;java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.VectorShuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Double64Vector.Double64Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Float128Vector.Float128Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Float256Vector.Float256Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Float512Vector.Float512Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.FloatMaxVector.FloatMaxShuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Short128Vector.Short128Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Short256Vector.Short256Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Short512Vector.Short512Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.ShortMaxVector.ShortMaxShuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Double128Vector.Double128Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Double256Vector.Double256Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.Double512Vector.Double512Shuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)
jdk.incubator.vector.DoubleMaxVector.DoubleMaxShuffle#intoMemorySegment(java.lang.foreign.MemorySegment;long;java.nio.ByteOrder;)

View File

@@ -73,7 +73,7 @@ feature.classfile.api=ClassFile API
feature.stream.gatherers=Stream Gatherers
feature.foreign.functions=Foreign Function & Memory API
feature.virtual.threads=Virtual Threads
feature.statements.before.super=Statements before super()
feature.statements.before.super=Flexible Constructor Bodies
feature.module.import.declarations=Module Import Declarations
feature.package.import.shadow.module.import=Import-on-demand over module import
feature.package.transitive.dependency.on.java.base=Transitive dependency on java.base module
@@ -159,5 +159,7 @@ jdk.23.language.level.description=23 - Markdown documentation comments
jdk.23.preview.language.level.description=23 (Preview) - Primitive types in patterns, implicitly declared classes, etc.
jdk.24.language.level.description=24 - Stream gatherers
jdk.24.preview.language.level.description=24 (Preview) - Flexible constructor bodies, simple source files, etc.
jdk.25.language.level.description=25 - Compact source files, flexible constructor bodies
jdk.25.preview.language.level.description=25 (Preview) - Primitive Types in Patterns, etc.
jdk.X.language.level.description=X - Experimental features
jdk.unsupported.preview.language.level.description={0} (Preview) - Unsupported

View File

@@ -37,7 +37,8 @@ enum class JavaSdkVersion(val maxLanguageLevel: LanguageLevel) {
JDK_22(LanguageLevel.JDK_22),
JDK_23(LanguageLevel.JDK_23),
JDK_24(LanguageLevel.JDK_24),
JDK_25(LanguageLevel.JDK_X);
JDK_25(LanguageLevel.JDK_25),
JDK_26(LanguageLevel.JDK_X);
val description: @NlsSafe String
get() {

View File

@@ -200,7 +200,7 @@ enum class JavaFeature {
get() = if (minimumLevel.isPreview) null else this.minimumLevel
companion object {
// Should correspond to jdk.internal.javac.PreviewFeature.Feature enum
// Values taken from jdk.internal.javac.PreviewFeature.Feature enum
@Contract(pure = true)
@JvmStatic
fun convertFromPreviewFeatureName(feature: @NonNls String): JavaFeature? {
@@ -217,6 +217,7 @@ enum class JavaFeature {
"STREAM_GATHERERS" -> STREAM_GATHERERS
"FOREIGN" -> FOREIGN_FUNCTIONS
"VIRTUAL_THREADS" -> VIRTUAL_THREADS
"MODULE_IMPORTS" -> MODULE_IMPORT_DECLARATIONS
else -> null
}
}

View File

@@ -66,7 +66,9 @@ enum class LanguageLevel {
JDK_23_PREVIEW(messagePointer("jdk.23.preview.language.level.description"), 23),
JDK_24(messagePointer("jdk.24.language.level.description"), 24),
JDK_24_PREVIEW(messagePointer("jdk.24.preview.language.level.description"), 24),
JDK_X(messagePointer("jdk.X.language.level.description"), 25),
JDK_25(messagePointer("jdk.25.language.level.description"), 25),
JDK_25_PREVIEW(messagePointer("jdk.25.preview.language.level.description"), 25),
JDK_X(messagePointer("jdk.X.language.level.description"), 26),
;
private val myPresentableText: () -> @Nls String
@@ -195,7 +197,7 @@ enum class LanguageLevel {
* The highest language level supported by the analyzer.
*/
@JvmField
val HIGHEST: LanguageLevel = JDK_24
val HIGHEST: LanguageLevel = JDK_25
private val ourStandardVersions: Map<Int, LanguageLevel> = LanguageLevel.entries.asSequence()
.filterNot { ver -> ver.isPreview }

View File

@@ -504,6 +504,8 @@ e:org.jetbrains.jps.model.java.LanguageLevel
- sf:JDK_23_PREVIEW:org.jetbrains.jps.model.java.LanguageLevel
- sf:JDK_24:org.jetbrains.jps.model.java.LanguageLevel
- sf:JDK_24_PREVIEW:org.jetbrains.jps.model.java.LanguageLevel
- sf:JDK_25:org.jetbrains.jps.model.java.LanguageLevel
- sf:JDK_25_PREVIEW:org.jetbrains.jps.model.java.LanguageLevel
- sf:JDK_X:org.jetbrains.jps.model.java.LanguageLevel
- feature():I
- isPreview():Z

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.jps.model.java;
import com.intellij.util.lang.JavaVersion;
@@ -30,11 +30,12 @@ public enum LanguageLevel {
JDK_22(22), JDK_22_PREVIEW(22),
JDK_23(23), JDK_23_PREVIEW(23),
JDK_24(24), JDK_24_PREVIEW(24),
JDK_X(24),
JDK_25(25), JDK_25_PREVIEW(25),
JDK_X(26),
;
public static final LanguageLevel HIGHEST = JDK_24;
public static final LanguageLevel HIGHEST = JDK_25;
private final JavaVersion myVersion;