Skip to content

Java: Accept new test results after JDK 26 extractor upgrade#21494

Merged
IdrissRio merged 4 commits intomainfrom
idrissrio/java/jdk26
Apr 7, 2026
Merged

Java: Accept new test results after JDK 26 extractor upgrade#21494
IdrissRio merged 4 commits intomainfrom
idrissrio/java/jdk26

Conversation

@IdrissRio
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions bot added the Java label Mar 18, 2026
@IdrissRio IdrissRio force-pushed the idrissrio/java/jdk26 branch 6 times, most recently from 2d8454a to 61eb42f Compare March 19, 2026 11:12
@IdrissRio IdrissRio force-pushed the idrissrio/java/jdk26 branch 6 times, most recently from 4abf8a3 to 41f4b4f Compare March 25, 2026 18:43
@IdrissRio IdrissRio force-pushed the idrissrio/java/jdk26 branch 5 times, most recently from 1420169 to 7662886 Compare April 1, 2026 12:47
Thread.stop() was removed in JDK 26. Pin the test to --release 25.
JDK 26 added ofLazy methods to List, Map, and Set collections.
Update expected test output to include these new methods.
Accept new ByteOrder.getEntries, List.ofLazy, and Map.ofLazy entries
in kotlin2 test expected files.
@IdrissRio IdrissRio force-pushed the idrissrio/java/jdk26 branch from 7662886 to 6f199b9 Compare April 7, 2026 07:28
@IdrissRio IdrissRio added depends on internal PR This PR should only be merged in sync with an internal Semmle PR no-change-note-required This PR does not need a change note labels Apr 7, 2026
@IdrissRio IdrissRio marked this pull request as ready for review April 7, 2026 08:02
@IdrissRio IdrissRio requested review from a team as code owners April 7, 2026 08:02
Copilot AI review requested due to automatic review settings April 7, 2026 08:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Java and Kotlin test configurations/expectations to align with new extractor output after the JDK 26 upgrade, keeping tests compiling against --release 25 where needed.

Changes:

  • Add/pin Java extractor compilation options for a security query test (--release 25).
  • Remove --enable-preview from several Java library-test option sets (now compiling cleanly without preview flags).
  • Refresh multiple .expected baselines to match updated extractor/JDK results (location ranges, diagnostics, new JDK API surface).
Show a summary per file
File Description
java/ql/test/query-tests/security/CWE-676/semmle/tests/options Pins compilation to --release 25 for stable extraction/compilation.
java/ql/test/library-tests/module-import-declarations/options Drops --enable-preview from module import declaration test compilation.
java/ql/test/library-tests/flexible-constructors/options Drops --enable-preview from flexible constructor test compilation.
java/ql/test/library-tests/errorexpr/Test.java Updates expected diagnostics (removes no-longer-emitted message).
java/ql/test/library-tests/dataflow/scoped-values/options Drops --enable-preview from scoped values dataflow test compilation.
java/ql/test/library-tests/dataflow/kdf/options Drops --enable-preview from KDF dataflow test compilation.
java/ql/test/library-tests/compact-source-files/options Drops --enable-preview from compact source file test compilation.
java/ql/test/library-tests/compact-source-files/MethodInCompactSource.expected Updates extracted location ranges for implicit/init members.
java/ql/test/library-tests/compact-source-files/ImplicitClassDetection.expected Updates extracted location range for implicit class.
java/ql/test/library-tests/compact-source-files/CompactSourceAnalysis.expected Updates extracted location range referenced by analysis output.
java/ql/test-kotlin2/library-tests/reflection/reflection.expected Accepts new external enum accessor (ByteOrder.getEntries).
java/ql/test-kotlin2/library-tests/java-kotlin-collection-type-generic-methods/test.expected Accepts new JDK API methods (ofLazy) in expected method listings.
java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/test.expected Same as Kotlin2: accepts new ofLazy overloads in expected listings.

Copilot's findings

  • Files reviewed: 13/13 changed files
  • Comments generated: 0

@IdrissRio IdrissRio merged commit 39f92e9 into main Apr 7, 2026
15 of 17 checks passed
@IdrissRio IdrissRio deleted the idrissrio/java/jdk26 branch April 7, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

depends on internal PR This PR should only be merged in sync with an internal Semmle PR Java Kotlin no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants