-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Java: Add test for multi-module projects with different Java versions #20615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
319cd47 to
2840662
Compare
e1e38c2 to
2840662
Compare
7595248 to
f708313
Compare
f708313 to
074c726
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces new integration tests for Maven-based Java projects that verify the handling of different Java version configurations and compilation scenarios. The tests ensure that CodeQL's database creation works correctly across various Java version setups.
Key changes:
- Added four new Maven integration test projects to validate Java version handling
- Created test cases for multimodule projects with different Java versions per module, module flags (--add-exports), execution-specific Java versions, and Java 8 projects with Java 11+ dependencies
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| maven-multimodule-test-java-version/* | Tests a Maven multimodule project where parent uses Java 17 and test-module uses Java 21 with pattern matching features |
| maven-java8-java11-dependency/* | Tests a Java 8 project that depends on TestNG 7.7.0, which requires Java 11+ |
| maven-java16-with-higher-jdk/* | Tests a Java 16 project using records that should compile when only Java 17+ is available |
| maven-execution-specific-java-version/* | Tests a project with different Java versions per execution (Java 11 for main, Java 17 for test code) |
| maven-add-exports-module-flags/* | Tests a project using --add-exports flags to access JDK compiler internals |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import java.util.List; | ||
|
|
||
| /** | ||
| * Simple class using Java 16 features (e.g.,records). |
Copilot
AI
Nov 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after comma in 'e.g.,records'. Should be 'e.g., records' with a space after the comma.
| * Simple class using Java 16 features (e.g.,records). | |
| * Simple class using Java 16 features (e.g., records). |
This PR adds 5 new integration tests:
--add-exportsmodule flag detection