GeezerVison is showing github.com — [core] chore: Bump minimum Java version required for building to 17 by adangel · Pull Request #6061 · pmd/pmd
Conversation
Describe the PR
Bumps the minimum Java version required for building PMD to Java 17.
This is only a build requirement. Java 17 is not required at runtime.
This should allow us to upgrade to checkstyle 11.
Related issues
Ready?
- Added unit tests for fixed bug/feature
- Passing all unit tests
- Complete build
./mvnw clean verify passes (checked automatically by github actions)
- Added (in-code) documentation (if needed)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Documentation Preview
Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Regression Tester Report
(comment created at 2025-09-26 10:21:36+00:00 for 5e78f88)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
For the differences in Checkstyle analysis: #6079
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This is only a build requirement. Java 17 is not required at runtime.
For the differences in Checkstyle analysis: #6079
It took me a while to understand... thanks for fixing the false-negative with Identical Catch branches. You are probably right, that these difference stem from the change from java 11 to java 17.
But this shows the following underlying issues:
- pmd regression tester uses the java version, that is on the path. Which is now java 17. But: We don't configure PMD correctly yet, to also include a specific java version on the auxclasspath. This problem would be detected by (PoC) [java] Verify JDK API Version #5299 - but is not implemented yet. This means: whenever you change the runtime version of Java to run PMD, you also change the typeresolution. This means, we are still not in the place, that PMD's analysis is independent of the java version it is executed with.
- pmd regression tester will build PMD on its own (which it doesn't do on the github actions, as it reused the previously built PMD binary) and uses the java version that is on the path. This PR raises it to Java 17, so this would work. But if I would have put "11" as the default, then pmd-regression-tester wouldn't be able to build PMD.
I think, we simply need to include the java classpath when generating the auxclasspath here:
|
<auxclasspath-command>echo -n "$(pwd)/target/classes:$(pwd)/target/test-classes:"; cat classpath.txt</auxclasspath-command> |
I'll give it a try...
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|