Skip to content

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

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

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

Conversation

@IdrissRio

Copy link
Copy Markdown
Contributor

No description provided.

@IdrissRio
IdrissRioforce-pushed the idrissrio/java/jdk26 branch 6 times, most recently from 2d8454a to 61eb42fCompareMarch 19, 2026 11:12
@IdrissRio
IdrissRioforce-pushed the idrissrio/java/jdk26 branch 6 times, most recently from 4abf8a3 to 41f4b4fCompareMarch 25, 2026 18:43
@IdrissRio
IdrissRioforce-pushed the idrissrio/java/jdk26 branch 5 times, most recently from 1420169 to 7662886CompareApril 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
IdrissRioforce-pushed the idrissrio/java/jdk26 branch from 7662886 to 6f199b9CompareApril 7, 2026 07:28
@IdrissRioIdrissRio 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 ownersApril 7, 2026 08:02
CopilotAI review requested due to automatic review settings April 7, 2026 08:02

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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
FileDescription
java/ql/test/query-tests/security/CWE-676/semmle/tests/optionsPins compilation to --release 25 for stable extraction/compilation.
java/ql/test/library-tests/module-import-declarations/optionsDrops --enable-preview from module import declaration test compilation.
java/ql/test/library-tests/flexible-constructors/optionsDrops --enable-preview from flexible constructor test compilation.
java/ql/test/library-tests/errorexpr/Test.javaUpdates expected diagnostics (removes no-longer-emitted message).
java/ql/test/library-tests/dataflow/scoped-values/optionsDrops --enable-preview from scoped values dataflow test compilation.
java/ql/test/library-tests/dataflow/kdf/optionsDrops --enable-preview from KDF dataflow test compilation.
java/ql/test/library-tests/compact-source-files/optionsDrops --enable-preview from compact source file test compilation.
java/ql/test/library-tests/compact-source-files/MethodInCompactSource.expectedUpdates extracted location ranges for implicit/init members.
java/ql/test/library-tests/compact-source-files/ImplicitClassDetection.expectedUpdates extracted location range for implicit class.
java/ql/test/library-tests/compact-source-files/CompactSourceAnalysis.expectedUpdates extracted location range referenced by analysis output.
java/ql/test-kotlin2/library-tests/reflection/reflection.expectedAccepts new external enum accessor (ByteOrder.getEntries).
java/ql/test-kotlin2/library-tests/java-kotlin-collection-type-generic-methods/test.expectedAccepts new JDK API methods (ofLazy) in expected method listings.
java/ql/test-kotlin1/library-tests/java-kotlin-collection-type-generic-methods/test.expectedSame 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 mainApr 7, 2026
15 of 17 checks passed
@IdrissRio
IdrissRio deleted the idrissrio/java/jdk26 branch April 7, 2026 10:03
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

depends on internal PRThis PR should only be merged in sync with an internal Semmle PRJavaKotlinno-change-note-requiredThis PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@IdrissRio@smowton