mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-382921 [java]: introduce language level 26
GitOrigin-RevId: 52ce519b4445569dad4f3673ae1a7979784d5567
This commit is contained in:
committed by
intellij-monorepo-bot
parent
be0070b448
commit
6a2c7c78d2
@@ -0,0 +1,91 @@
|
||||
java.sql.Blob#close()
|
||||
java.sql.Clob#close()
|
||||
java.sql.Array#close()
|
||||
java.sql.Types#DECFLOAT
|
||||
java.sql.Types#JSON
|
||||
java.sql.SQLXML#close()
|
||||
java.sql.JDBCType#DECFLOAT
|
||||
java.sql.JDBCType#JSON
|
||||
java.sql.Connection#enquoteLiteral(java.lang.String;)
|
||||
java.sql.Connection#enquoteIdentifier(java.lang.String;boolean;)
|
||||
java.sql.Connection#isSimpleIdentifier(java.lang.String;)
|
||||
java.sql.Connection#enquoteNCharLiteral(java.lang.String;)
|
||||
jdk.internal.vm.annotation.AOTRuntimeSetup
|
||||
jdk.internal.vm.annotation.AOTSafeClassInitializer
|
||||
sun.security.pkcs12.PBMAC1Parameters
|
||||
java.lang.reflect.ClassFileFormatVersion#RELEASE_26
|
||||
java.lang.classfile.ClassFile#JAVA_26_VERSION
|
||||
java.lang.String#equalsFoldCase(java.lang.String;)
|
||||
java.lang.String#UNICODE_CASEFOLD_ORDER
|
||||
java.lang.String#compareToFoldCase(java.lang.String;)
|
||||
java.lang.Process#close()
|
||||
java.lang.Character.UnicodeBlock#SIDETIC
|
||||
java.lang.Character.UnicodeBlock#SHARADA_SUPPLEMENT
|
||||
java.lang.Character.UnicodeBlock#TOLONG_SIKI
|
||||
java.lang.Character.UnicodeBlock#BERIA_ERFE
|
||||
java.lang.Character.UnicodeBlock#TANGUT_COMPONENTS_SUPPLEMENT
|
||||
java.lang.Character.UnicodeBlock#MISCELLANEOUS_SYMBOLS_SUPPLEMENT
|
||||
java.lang.Character.UnicodeBlock#TAI_YO
|
||||
java.lang.Character.UnicodeBlock#CJK_UNIFIED_IDEOGRAPHS_EXTENSION_J
|
||||
java.lang.Character.UnicodeScript#SIDETIC
|
||||
java.lang.Character.UnicodeScript#TOLONG_SIKI
|
||||
java.lang.Character.UnicodeScript#BERIA_ERFE
|
||||
java.lang.Character.UnicodeScript#TAI_YO
|
||||
java.lang.LazyConstant
|
||||
java.math.BigInteger#rootn(int;)
|
||||
java.math.BigInteger#rootnAndRemainder(int;)
|
||||
java.time.Instant#plusSaturating(java.time.Duration;)
|
||||
java.time.Duration#MIN
|
||||
java.time.Duration#MAX
|
||||
java.util.Map#ofLazy(java.util.Set<? extends K>;java.util.function.Function<? super K,? extends V>;)
|
||||
java.util.List#ofLazy(int;java.util.function.IntFunction<? extends E>;)
|
||||
java.util.UUID#ofEpochMillis(long;)
|
||||
java.util.concurrent.Joiners.AllSubtasks#onTimeout()
|
||||
java.util.concurrent.StructuredTaskScope.Joiner#onTimeout()
|
||||
java.util.concurrent.StructuredTaskScope.Joiner#anySuccessfulOrThrow()
|
||||
java.util.concurrent.StructuredTaskScope#open(java.util.concurrent.StructuredTaskScope.Joiner<? super T,? extends R>;java.util.function.UnaryOperator<java.util.concurrent.StructuredTaskScope.Configuration>;)
|
||||
java.util.Comparator#max(U;U;)
|
||||
java.util.Comparator#min(U;U;)
|
||||
java.security.PEM
|
||||
javax.crypto.spec.HPKEParameterSpec
|
||||
javax.crypto.EncryptedPrivateKeyInfo#encrypt(java.security.DEREncodable;char[];java.lang.String;java.security.spec.AlgorithmParameterSpec;java.security.Provider;)
|
||||
javax.crypto.EncryptedPrivateKeyInfo#encrypt(java.security.DEREncodable;char[];)
|
||||
javax.crypto.EncryptedPrivateKeyInfo#encrypt(java.security.DEREncodable;java.security.Key;java.lang.String;java.security.spec.AlgorithmParameterSpec;java.security.Provider;java.security.SecureRandom;)
|
||||
javax.crypto.EncryptedPrivateKeyInfo#getKeyPair(char[];)
|
||||
javax.crypto.EncryptedPrivateKeyInfo#getKeyPair(java.security.Key;java.security.Provider;)
|
||||
jdk.jshell.SourceCodeAnalysis#completionSuggestions(java.lang.String;int;jdk.jshell.SourceCodeAnalysis.ElementSuggestionConvertor<S>;)
|
||||
jdk.jshell.SourceCodeAnalysis.ElementSuggestion
|
||||
jdk.jshell.SourceCodeAnalysis.CompletionState
|
||||
jdk.jshell.SourceCodeAnalysis.CompletionContext
|
||||
jdk.jshell.SourceCodeAnalysis.ElementSuggestionConvertor
|
||||
jdk.jshell.SourceCodeAnalysis.Documentation#activeParameterIndex()
|
||||
jdk.jshell.SourceCodeAnalysisImpl#completionSuggestions(java.lang.String;int;jdk.jshell.SourceCodeAnalysis.ElementSuggestionConvertor<Suggestion>;)
|
||||
java.awt.Robot#click(int;)
|
||||
java.awt.Robot#click()
|
||||
java.awt.Robot#waitForIdle(int;)
|
||||
java.awt.Robot#glide(int;int;)
|
||||
java.awt.Robot#glide(int;int;int;int;)
|
||||
java.awt.Robot#glide(int;int;int;int;int;int;)
|
||||
java.awt.Robot#type(int;)
|
||||
java.awt.Robot#type(char;)
|
||||
javax.lang.model.SourceVersion#RELEASE_26
|
||||
jdk.internal.net.http.HttpRequestImpl#getOption(java.net.http.HttpOption<T>;)
|
||||
jdk.internal.net.http.ImmutableHttpRequest#getOption(java.net.http.HttpOption<T>;)
|
||||
jdk.internal.net.http.HttpRequestBuilderImpl#setOption(java.net.http.HttpOption<T>;T;)
|
||||
java.net.http.HttpClient.Version#HTTP_3
|
||||
java.net.http.HttpOption.Http3DiscoveryMode
|
||||
java.net.http.HttpOption
|
||||
java.net.http.HttpRequest#getOption(java.net.http.HttpOption<T>;)
|
||||
java.net.http.HttpRequest.Builder#setOption(java.net.http.HttpOption<T>;T;)
|
||||
java.net.http.HttpRequest.BodyPublishers#ofFileChannel(java.nio.channels.FileChannel;long;long;)
|
||||
java.net.http.HttpResponse.PushPromiseHandler.PushId.Http3PushId
|
||||
java.net.http.HttpResponse.PushPromiseHandler.PushId
|
||||
java.net.http.HttpResponse.PushPromiseHandler#applyPushPromise(java.net.http.HttpRequest;java.net.http.HttpRequest;java.net.http.HttpResponse.PushPromiseHandler.PushId;java.util.function.Function<java.net.http.HttpResponse.BodyHandler<T>,java.util.concurrent.CompletableFuture<java.net.http.HttpResponse<T>>>;)
|
||||
java.net.http.HttpResponse.PushPromiseHandler#notifyAdditionalPromise(java.net.http.HttpRequest;java.net.http.HttpResponse.PushPromiseHandler.PushId;)
|
||||
java.net.http.StreamLimitException
|
||||
java.net.http.UnsupportedProtocolVersionException
|
||||
com.sun.net.httpserver.HttpExchange#RSPBODY_EMPTY
|
||||
com.sun.net.httpserver.HttpExchange#RSPBODY_CHUNKED
|
||||
jdk.management.HotSpotAOTCacheMXBean
|
||||
sun.management.MemoryImpl#getTotalGcCpuTime()
|
||||
java.lang.management.MemoryMXBean#getTotalGcCpuTime()
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.intellij.java.syntax
|
||||
|
||||
// Generated by generateBundleMapping.kt
|
||||
// To regenerate the file, please run `GenerateBundleMapping` run configuration with the following parameters:
|
||||
// <full path to JavaSyntaxBundle.properties> <full path to DefaultJavaSyntaxResources.kt> com.intellij.java.syntax
|
||||
// To regenerate the file, please run `GenerateBundleMapping` run configuration with the following parameters: ")
|
||||
// <full path to JavaSyntaxBundle.properties> <full path to DefaultJavaSyntaxResources.kt> com.intellij.java.syntax
|
||||
internal object DefaultJavaSyntaxResources {
|
||||
val mappings: Map<String, String> = mapOf(
|
||||
"annotation.name.is.missing" to "Annotation attribute of the form 'name=value' expected",
|
||||
@@ -100,6 +99,7 @@ internal object DefaultJavaSyntaxResources {
|
||||
"feature.pattern.guard.and.record.patterns" to "Pattern guards and record patterns",
|
||||
"feature.patterns.in.switch" to "Patterns in switch",
|
||||
"feature.patterns.instanceof" to "Patterns in 'instanceof'",
|
||||
"feature.patterns.with.tightened.dominance" to "Patterns with tightened dominance",
|
||||
"feature.pem.api" to "PEM Encodings API",
|
||||
"feature.primitive.types.in.patterns" to "Primitive types in patterns, instanceof and switch",
|
||||
"feature.private.interface.methods" to "Private interface methods",
|
||||
@@ -137,7 +137,6 @@ internal object DefaultJavaSyntaxResources {
|
||||
"feature.varargs" to "Variable arity methods",
|
||||
"feature.virtual.threads" to "Virtual Threads",
|
||||
"feature.with.initial" to "ThreadLocal.withInitial()",
|
||||
"feature.patterns.with.tightened.dominance" to "Patterns with tightened dominance",
|
||||
"finally.without.try" to "'finally' without 'try'",
|
||||
"import.statement.identifier.or.asterisk.expected." to "Identifier or '*' expected",
|
||||
"jdk.1.3.language.level.description" to "1.3 - Plain old Java",
|
||||
@@ -164,10 +163,12 @@ internal object DefaultJavaSyntaxResources {
|
||||
"jdk.22.preview.language.level.description" to "22 (Preview) - Statements before super(), string templates (2nd preview), etc.",
|
||||
"jdk.23.language.level.description" to "23 - Markdown documentation comments",
|
||||
"jdk.23.preview.language.level.description" to "23 (Preview) - Primitive types in patterns, implicitly declared classes, etc.",
|
||||
"jdk.24.language.level.description" to "24 - Stream gatherers",
|
||||
"jdk.24.language.level.description" to "24 - No new language features",
|
||||
"jdk.24.preview.language.level.description" to "24 (Preview) - Flexible constructor bodies, simple source files, etc.",
|
||||
"jdk.25.language.level.description" to "25 - Compact source files, module imports",
|
||||
"jdk.25.preview.language.level.description" to "25 (Preview) - Primitive Types in Patterns, etc.",
|
||||
"jdk.25.language.level.description" to "25 - Compact source files, module imports, etc.",
|
||||
"jdk.25.preview.language.level.description" to "25 (Preview) - Primitive types in patterns (3rd preview)",
|
||||
"jdk.26.language.level.description" to "26 - No new language features",
|
||||
"jdk.26.preview.language.level.description" to "26 (Preview) - Primitive types in patterns (4th preview)",
|
||||
"jdk.X.language.level.description" to "X - Experimental features",
|
||||
"jdk.unsupported.preview.language.level.description" to "{0} (Preview) - Unsupported",
|
||||
"unexpected.identifier" to "Unexpected identifier",
|
||||
|
||||
@@ -163,9 +163,11 @@ jdk.22.language.level.description=22 - Unnamed variables and patterns
|
||||
jdk.22.preview.language.level.description=22 (Preview) - Statements before super(), string templates (2nd preview), etc.
|
||||
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.language.level.description=24 - No new language features
|
||||
jdk.24.preview.language.level.description=24 (Preview) - Flexible constructor bodies, simple source files, etc.
|
||||
jdk.25.language.level.description=25 - Compact source files, module imports
|
||||
jdk.25.preview.language.level.description=25 (Preview) - Primitive Types in Patterns, etc.
|
||||
jdk.25.language.level.description=25 - Compact source files, module imports, etc.
|
||||
jdk.25.preview.language.level.description=25 (Preview) - Primitive types in patterns (3rd preview)
|
||||
jdk.26.language.level.description=26 - No new language features
|
||||
jdk.26.preview.language.level.description=26 (Preview) - Primitive types in patterns (4th preview)
|
||||
jdk.X.language.level.description=X - Experimental features
|
||||
jdk.unsupported.preview.language.level.description={0} (Preview) - Unsupported
|
||||
|
||||
@@ -38,7 +38,8 @@ enum class JavaSdkVersion(val maxLanguageLevel: LanguageLevel) {
|
||||
JDK_23(LanguageLevel.JDK_23),
|
||||
JDK_24(LanguageLevel.JDK_24),
|
||||
JDK_25(LanguageLevel.JDK_25),
|
||||
JDK_26(LanguageLevel.JDK_X);
|
||||
JDK_26(LanguageLevel.JDK_26),
|
||||
JDK_27(LanguageLevel.JDK_X);
|
||||
|
||||
val description: @NlsSafe String
|
||||
get() {
|
||||
|
||||
@@ -68,7 +68,9 @@ enum class LanguageLevel {
|
||||
JDK_24_PREVIEW(messagePointer("jdk.24.preview.language.level.description"), 24),
|
||||
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),
|
||||
JDK_26(messagePointer("jdk.26.language.level.description"), 26),
|
||||
JDK_26_PREVIEW(messagePointer("jdk.26.preview.language.level.description"), 26),
|
||||
JDK_X(messagePointer("jdk.X.language.level.description"), 27),
|
||||
;
|
||||
|
||||
private val myPresentableText: () -> @Nls String
|
||||
@@ -197,7 +199,7 @@ enum class LanguageLevel {
|
||||
* The highest language level supported by the analyzer.
|
||||
*/
|
||||
@JvmField
|
||||
val HIGHEST: LanguageLevel = JDK_25
|
||||
val HIGHEST: LanguageLevel = JDK_26
|
||||
|
||||
private val ourStandardVersions: Map<Int, LanguageLevel> = LanguageLevel.entries.asSequence()
|
||||
.filterNot { ver -> ver.isPreview }
|
||||
|
||||
@@ -506,6 +506,8 @@ e: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_26:org.jetbrains.jps.model.java.LanguageLevel
|
||||
- sf:JDK_26_PREVIEW:org.jetbrains.jps.model.java.LanguageLevel
|
||||
- sf:JDK_X:org.jetbrains.jps.model.java.LanguageLevel
|
||||
- feature():I
|
||||
- isPreview():Z
|
||||
|
||||
@@ -31,11 +31,12 @@ public enum LanguageLevel {
|
||||
JDK_23(23), JDK_23_PREVIEW(23),
|
||||
JDK_24(24), JDK_24_PREVIEW(24),
|
||||
JDK_25(25), JDK_25_PREVIEW(25),
|
||||
JDK_X(26),
|
||||
JDK_26(26), JDK_26_PREVIEW(26),
|
||||
JDK_X(27),
|
||||
|
||||
;
|
||||
|
||||
public static final LanguageLevel HIGHEST = JDK_25;
|
||||
public static final LanguageLevel HIGHEST = JDK_26;
|
||||
|
||||
private final JavaVersion myVersion;
|
||||
|
||||
|
||||
+6
-2
@@ -6,6 +6,10 @@ import com.intellij.openapi.module.LanguageLevelUtil
|
||||
import com.intellij.pom.java.LanguageLevel
|
||||
|
||||
class JavaJavaApiUsageInspectionTest : JavaApiUsageInspectionTestBase() {
|
||||
|
||||
override val sdkLevel: LanguageLevel
|
||||
get() = LanguageLevel.JDK_25
|
||||
|
||||
fun `test constructor`() {
|
||||
myFixture.setLanguageLevel(LanguageLevel.JDK_1_4)
|
||||
myFixture.testHighlighting(JvmLanguage.JAVA, """
|
||||
@@ -336,7 +340,7 @@ class JavaJavaApiUsageInspectionTest : JavaApiUsageInspectionTestBase() {
|
||||
}
|
||||
""".trimIndent())
|
||||
|
||||
myFixture.runQuickFix("Set language level to 25 (Preview) - Primitive Types in Patterns, etc.")
|
||||
myFixture.runQuickFix("Set language level to 25 (Preview) - Primitive types in patterns (3rd preview)")
|
||||
assertEquals(LanguageLevel.JDK_25_PREVIEW, LanguageLevelUtil.getEffectiveLanguageLevel(myFixture.module))
|
||||
}
|
||||
|
||||
@@ -353,7 +357,7 @@ class JavaJavaApiUsageInspectionTest : JavaApiUsageInspectionTestBase() {
|
||||
}
|
||||
""".trimIndent())
|
||||
|
||||
myFixture.runQuickFix("Set language level to 25 (Preview) - Primitive Types in Patterns, etc.")
|
||||
myFixture.runQuickFix("Set language level to 25 (Preview) - Primitive types in patterns (3rd preview)")
|
||||
assertEquals(LanguageLevel.JDK_25_PREVIEW, LanguageLevelUtil.getEffectiveLanguageLevel(myFixture.module))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user