Skip to content

Fix Java extractor compilation failure on newer JDKs - #25

Merged
carlspring merged 6 commits into
masterfrom
copilot/fix-build-and-publish-java
Aug 5, 2026
Merged

Fix Java extractor compilation failure on newer JDKs#25
carlspring merged 6 commits into
masterfrom
copilot/fix-build-and-publish-java

Conversation

Copilot AI commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

All 3 CodeQL test extractions fail because the test options files specify -source 17 without a matching -target 17, leaving the extractor's default -target 8 in effect. On Java 21+, javac rejects -source 17 -target 8 as invalid (target cannot be lower than source).

Changes

  • src/test/ql/test/query-tests/*/options — Added -target 17 to all three test options files (InsecureCorsHttpOrigin, InsecureCorsWildcardOrigin, InsecureHttpServer)
-//semmle-extractor-options: --javac-args -cp ${testdir}/../../stubs/ -source 17
+//semmle-extractor-options: --javac-args -cp ${testdir}/../../stubs/ -source 17 -target 17

Since javac uses the last occurrence of each flag, this overrides the extractor's default -source 8 -target 8 with a consistent -source 17 -target 17.

Copilot AI and others added 2 commits August 5, 2026 16:09
Co-authored-by: carlspring <1436265+carlspring@users.noreply.github.com>
Co-authored-by: carlspring <1436265+carlspring@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job build-and-publish (java) Fix Java extractor compilation failure on newer JDKs Aug 5, 2026
Copilot AI requested a review from carlspring August 5, 2026 16:10
Co-authored-by: carlspring <1436265+carlspring@users.noreply.github.com>
Co-authored-by: carlspring <1436265+carlspring@users.noreply.github.com>
Co-authored-by: carlspring <1436265+carlspring@users.noreply.github.com>
@carlspring
carlspring marked this pull request as ready for review August 5, 2026 16:32
@carlspring
carlspring merged commit e1cd4c4 into master Aug 5, 2026
1 check passed
@carlspring
carlspring deleted the copilot/fix-build-and-publish-java branch August 5, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants