Upgrade to JDK 17#13
Merged
Merged
Conversation
Reviewer's GuideUpgrades the project to Java 17 by updating the Airlift parent, Maven plugins, Mockito, adding Maven wrapper support, and making small source/test adjustments for JDK 17 and newer Mockito APIs. Flow diagram for Maven wrapper bootstrap and executionflowchart TD
A["Start mvnw"] --> B["Read .mvn/wrapper/maven-wrapper.properties"]
B --> C{"Existing MAVEN_HOME for configured distribution?"}
C -->|"Yes"| D["Use existing Maven distribution"]
C -->|"No"| E["Create temp download directory"]
E --> F{"unzip available?"}
F -->|"Yes"| G["Download Maven .zip via wget/curl/Java"]
F -->|"No"| H["Download Maven .tar.gz via wget/curl/Java"]
G --> I["(Optional) Validate SHA-256 checksum"]
H --> I
I --> J{"Checksum valid or not configured?"}
J -->|"No"| Z["Fail with error"]
J -->|"Yes"| K["Extract Maven distribution"]
K --> L["Locate extracted Maven bin directory"]
L --> M["Move distribution to MAVEN_HOME"]
D --> N["Set JAVA_HOME / detect java and javac"]
M --> N
N --> O["Execute mvn or mvnd from MAVEN_HOME with project pom.xml"]
O --> P["Compile with source/target/release 17"]
P --> Q["Run tests via maven-surefire-plugin (with add-opens)"]
Q --> R["End mvnw run"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- In
TestMemoryManager, the newcloseTohelper returns anArgumentMatcherbut the call sites now use an inline lambda instead; either switchverify(...).checkMemory(...)back to usingcloseToor remove the unused helper to avoid dead code. - The
maven-surefire-plugin<argLine>configuration inpom.xmloverwrites any existingargLineinstead of appending, which can break other JVM args; consider using<argLine>${argLine} --add-opens ...</argLine>to preserve externally provided options.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `TestMemoryManager`, the new `closeTo` helper returns an `ArgumentMatcher` but the call sites now use an inline lambda instead; either switch `verify(...).checkMemory(...)` back to using `closeTo` or remove the unused helper to avoid dead code.
- The `maven-surefire-plugin` `<argLine>` configuration in `pom.xml` overwrites any existing `argLine` instead of appending, which can break other JVM args; consider using `<argLine>${argLine} --add-opens ...</argLine>` to preserve externally provided options.
## Individual Comments
### Comment 1
<location path="pom.xml" line_range="159-165" />
<code_context>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
</code_context>
<issue_to_address>
**issue:** Pin an explicit version for the maven-surefire-plugin to keep builds reproducible
This surefire config omits a `<version>`, so the actual version will depend on Maven defaults/parents and may change with tooling updates. Since you’re adding Java 17–specific flags, please pin a known Java 17–compatible surefire version (e.g. a 3.x release) to keep builds reproducible and avoid unexpected behavior changes.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
7a1c932 to
c4cc3fc
Compare
Merged
Draft
6 tasks
tdcmeehan
approved these changes
Apr 22, 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.
Required for prestodb/presto#24571
The changes have already been tested with CI in the above-linked PR.