diff --git a/docs/codeql/reusables/supported-versions-compilers.rst b/docs/codeql/reusables/supported-versions-compilers.rst index 7a88dd035c2a..a3ca1fdcbd94 100644 --- a/docs/codeql/reusables/supported-versions-compilers.rst +++ b/docs/codeql/reusables/supported-versions-compilers.rst @@ -18,7 +18,7 @@ .NET 5, .NET 6, .NET 7, .NET 8, .NET 9, .NET 10","``.sln``, ``.slnx``, ``.csproj``, ``.cs``, ``.cshtml``, ``.xaml``" GitHub Actions,"Not applicable",Not applicable,"``.github/workflows/*.yml``, ``.github/workflows/*.yaml``, ``**/action.yml``, ``**/action.yaml``" Go (aka Golang), "Go up to 1.26", "Go 1.11 or more recent", ``.go`` - Java,"Java 7 to 26 [6]_","javac (OpenJDK and Oracle JDK), + Java,"Java 7 to 27 [6]_","javac (OpenJDK and Oracle JDK), Eclipse compiler for Java (ECJ) [7]_",``.java`` Kotlin,"Kotlin 1.8.0 to 2.4.0\ *x*","kotlinc",``.kt`` @@ -36,7 +36,7 @@ .. [3] Objective-C, Objective-C++, C++/CLI, and C++/CX are not supported. .. [4] Support for the clang-cl compiler is preliminary. .. [5] Support for the Arm Compiler (armcc) is preliminary. - .. [6] Builds that execute on Java 7 to 26 can be analyzed. The analysis understands standard language features in Java 8 to 26; "preview" and "incubator" features are not supported. Source code using Java language versions older than Java 8 are analyzed as Java 8 code. + .. [6] Builds that execute on Java 7 to 27 can be analyzed. The analysis understands standard language features in Java 8 to 27; "preview" and "incubator" features are not supported. Source code using Java language versions older than Java 8 are analyzed as Java 8 code. .. [7] ECJ is supported when the build invokes it via the Maven Compiler plugin or the Takari Lifecycle plugin. .. [8] JSX and Flow code, YAML, JSON, HTML, and XML files may also be analyzed with JavaScript files. .. [9] The extractor requires Python 3 to run. To analyze Python 2.7 you should install both versions of Python. diff --git a/java/ql/integration-tests/java/buildless-erroneous/ExtractorInformation.expected b/java/ql/integration-tests/java/buildless-erroneous/ExtractorInformation.expected index b43963e4aca8..8f3146c677bb 100644 --- a/java/ql/integration-tests/java/buildless-erroneous/ExtractorInformation.expected +++ b/java/ql/integration-tests/java/buildless-erroneous/ExtractorInformation.expected @@ -2,7 +2,7 @@ | Number of calls with call target | 1 | | Number of calls with missing call target | 4 | | Number of diagnostics from CodeQL Java extractor with severity 5 | 10 | -| Number of diagnostics from CodeQL Java extractor with severity 6 | 2 | +| Number of diagnostics from CodeQL Java extractor with severity 6 | 1 | | Number of expressions with known type | 1 | | Number of expressions with unknown type | 6 | | Number of files | 606 | @@ -12,6 +12,6 @@ | Number of lines of code with extension java | 7 | | Percentage of calls with call target | 20 | | Percentage of expressions with known type | 14 | -| Total number of diagnostics from CodeQL Java extractor | 12 | +| Total number of diagnostics from CodeQL Java extractor | 11 | | Total number of lines | 13 | | Total number of lines with extension java | 13 | diff --git a/java/ql/src/change-notes/2026-07-03-support-java-27.md b/java/ql/src/change-notes/2026-07-03-support-java-27.md new file mode 100644 index 000000000000..36e815e70cda --- /dev/null +++ b/java/ql/src/change-notes/2026-07-03-support-java-27.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The Java extractor and QL libraries now support Java 27. diff --git a/java/ql/test/library-tests/errortype/Diags.expected b/java/ql/test/library-tests/errortype/Diags.expected index dfd80b2466a1..722f0c1e9c0e 100644 --- a/java/ql/test/library-tests/errortype/Diags.expected +++ b/java/ql/test/library-tests/errortype/Diags.expected @@ -1,7 +1,6 @@ -| Test.java:0:0:0:0 | 2 javac errors | | Test.java:6:5:6:15 | Unknown or erroneous type for expression of kind TypeAccess | | Test.java:6:23:6:39 | Unexpected symbol for constructor: new NoSuchClass() | | Test.java:6:23:6:39 | Unknown or erroneous type for expression of kind ClassInstanceCreation | | Test.java:6:27:6:37 | Unknown or erroneous type for expression of kind TypeAccess | | Test.java:7:12:7:14 | Unknown or erroneous type for expression of kind VarAccess | -| file://:0:0:0:0 | 2 errors during annotation processing | +| file://:0:0:0:0 | 1 errors during annotation processing | diff --git a/java/ql/test/library-tests/errortype/Test.java b/java/ql/test/library-tests/errortype/Test.java index c393faf75990..d108117fd28b 100644 --- a/java/ql/test/library-tests/errortype/Test.java +++ b/java/ql/test/library-tests/errortype/Test.java @@ -10,8 +10,7 @@ public NoSuchClass test() { } // Diagnostic Matches: Unexpected symbol for constructor: new NoSuchClass() -// Diagnostic Matches: 2 javac errors -// Diagnostic Matches: 2 errors during annotation processing +// Diagnostic Matches: 1 errors during annotation processing // Diagnostic Matches: Unknown or erroneous type for expression of kind TypeAccess // Diagnostic Matches: Unknown or erroneous type for expression of kind ClassInstanceCreation // Diagnostic Matches: Unknown or erroneous type for expression of kind VarAccess