Java: Accept new test results after JDK 26 extractor upgrade#21494
Merged
Java: Accept new test results after JDK 26 extractor upgrade#21494
Conversation
2d8454a to
61eb42f
Compare
4abf8a3 to
41f4b4f
Compare
1420169 to
7662886
Compare
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.
7662886 to
6f199b9
Compare
Contributor
There was a problem hiding this comment.
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-previewfrom several Java library-test option sets (now compiling cleanly without preview flags). - Refresh multiple
.expectedbaselines 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
smowton
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.