diff --git a/java/java-analysis-api/resources/com/intellij/openapi/module/api26.txt b/java/java-analysis-api/resources/com/intellij/openapi/module/api26.txt new file mode 100644 index 000000000000..b0c9bea5a370 --- /dev/null +++ b/java/java-analysis-api/resources/com/intellij/openapi/module/api26.txt @@ -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;java.util.function.Function;) +java.util.List#ofLazy(int;java.util.function.IntFunction;) +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;java.util.function.UnaryOperator;) +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;) +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;) +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;) +jdk.internal.net.http.ImmutableHttpRequest#getOption(java.net.http.HttpOption;) +jdk.internal.net.http.HttpRequestBuilderImpl#setOption(java.net.http.HttpOption;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;) +java.net.http.HttpRequest.Builder#setOption(java.net.http.HttpOption;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.util.concurrent.CompletableFuture>>;) +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() \ No newline at end of file diff --git a/java/java-syntax/gen/com/intellij/java/syntax/DefaultJavaSyntaxResources.kt b/java/java-syntax/gen/com/intellij/java/syntax/DefaultJavaSyntaxResources.kt index 9336cdc82014..be5451899c5d 100644 --- a/java/java-syntax/gen/com/intellij/java/syntax/DefaultJavaSyntaxResources.kt +++ b/java/java-syntax/gen/com/intellij/java/syntax/DefaultJavaSyntaxResources.kt @@ -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: -// com.intellij.java.syntax +// To regenerate the file, please run `GenerateBundleMapping` run configuration with the following parameters: ") +// com.intellij.java.syntax internal object DefaultJavaSyntaxResources { val mappings: Map = 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", diff --git a/java/java-syntax/resources/messages/JavaSyntaxBundle.properties b/java/java-syntax/resources/messages/JavaSyntaxBundle.properties index b95232802fd1..27922881149c 100644 --- a/java/java-syntax/resources/messages/JavaSyntaxBundle.properties +++ b/java/java-syntax/resources/messages/JavaSyntaxBundle.properties @@ -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 diff --git a/java/java-syntax/src/com/intellij/openapi/projectRoots/JavaSdkVersion.kt b/java/java-syntax/src/com/intellij/openapi/projectRoots/JavaSdkVersion.kt index 1f6b5d31e46e..31ba28177102 100644 --- a/java/java-syntax/src/com/intellij/openapi/projectRoots/JavaSdkVersion.kt +++ b/java/java-syntax/src/com/intellij/openapi/projectRoots/JavaSdkVersion.kt @@ -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() { diff --git a/java/java-syntax/src/com/intellij/pom/java/LanguageLevel.kt b/java/java-syntax/src/com/intellij/pom/java/LanguageLevel.kt index 28b29b2aa5ac..4472b77e4c76 100644 --- a/java/java-syntax/src/com/intellij/pom/java/LanguageLevel.kt +++ b/java/java-syntax/src/com/intellij/pom/java/LanguageLevel.kt @@ -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 = LanguageLevel.entries.asSequence() .filterNot { ver -> ver.isPreview } diff --git a/jps/model-api/api-dump.txt b/jps/model-api/api-dump.txt index e5ae357b3aa9..e8a90d7e2eca 100644 --- a/jps/model-api/api-dump.txt +++ b/jps/model-api/api-dump.txt @@ -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 diff --git a/jps/model-api/src/org/jetbrains/jps/model/java/LanguageLevel.java b/jps/model-api/src/org/jetbrains/jps/model/java/LanguageLevel.java index afa57096d4aa..a28ae156aa3d 100644 --- a/jps/model-api/src/org/jetbrains/jps/model/java/LanguageLevel.java +++ b/jps/model-api/src/org/jetbrains/jps/model/java/LanguageLevel.java @@ -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; diff --git a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/JavaJavaApiUsageInspectionTest.kt b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/JavaJavaApiUsageInspectionTest.kt index a8d26cd30ccb..4fb877af8e04 100644 --- a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/JavaJavaApiUsageInspectionTest.kt +++ b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/JavaJavaApiUsageInspectionTest.kt @@ -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)) }