Upgrade to Java 8 and add GitHub Actions CI - #64
Conversation
📝 WalkthroughWalkthroughAdds a GitHub Actions CI workflow that runs Maven verify on PRs and pushes to master/main using Temurin JDK 25 and uploads surefire reports; updates Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer (push/PR)
participant GH as GitHub
participant Runner as Actions Runner (ubuntu-latest)
participant Maven as Maven (inside runner)
participant Store as Artifact Store
Dev->>GH: push / open PR
GH->>Runner: trigger ci.yml job
Runner->>Runner: checkout repo
Runner->>Runner: setup Temurin JDK 25 + Maven cache
Runner->>Maven: mvn -B verify --file pom.xml
alt tests run
Maven-->>Runner: generate target/surefire-reports/
end
Runner->>Store: upload `target/surefire-reports/` as `test-results` (retention=7d)
note right of Store: upload step runs regardless of job result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🔇 Additional comments (3)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/ci.yml (1)
14-16: Consider addingfail-fast: falseto complete all matrix jobs.By default,
fail-fastistrue, which cancels remaining matrix jobs when one fails. For test matrices across Java versions, it's often valuable to see the full picture of which versions pass or fail.♻️ Suggested change
strategy: + fail-fast: false matrix: java-version: [8, 11, 17, 21]pom.xml (1)
43-44: Consider upgrading maven-compiler-plugin to a more recent version.Version 3.1 (released April 2013) is outdated. The latest stable version is 3.14.1 (September 2025), offering numerous improvements including better JDK support, enhanced error messages, and bug fixes accumulated over 12+ years of development.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/ci.ymlpom.xml
🧰 Additional context used
🪛 GitHub Actions: CI
pom.xml
[error] 1-1: BUILD FAILURE: Maven surefire test suite failed due to the above test errors. See target/surefire-reports for details. Command 'mvn -B verify --file pom.xml' exited with non-zero status.
🔇 Additional comments (3)
.github/workflows/ci.yml (2)
1-8: Well-structured CI workflow with good trigger configuration.The trigger configuration is appropriate - running on PRs to catch issues before merge and on pushes to track master/main health.
18-38: Steps are well-configured with proper action versions and caching.Good practices observed:
- Using latest action versions (v4)
- Maven dependency caching for faster builds
if: always()on artifact upload ensures test results are captured even on failure- 7-day retention is reasonable for debugging purposes
pom.xml (1)
46-47: Java 1.7 source/target is compatible with the CI matrix.The change to Java 1.7 source/target compatibility is appropriate and will work correctly with all JDK versions (8, 11, 17, 21) configured in the CI workflow.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pom.xml (1)
140-141: Upgrade JUnit to fix known security vulnerability.JUnit 4.13.1 has a known vulnerability (CVE-2020-15250) in the TemporaryFolder rule. Although this is test-scoped, it's recommended to upgrade to 4.13.2 which fixes this issue.
🔒 Proposed fix
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.13.1</version> + <version>4.13.2</version> <scope>test</scope> </dependency>
🤖 Fix all issues with AI agents
In @pom.xml:
- Line 44: Replace the old maven-compiler-plugin version 3.1 with 3.14.1 in the
pom (update the <version> under the maven-compiler-plugin plugin definition) and
switch any <source>/<target> configuration to the <release> setting (e.g.,
<release>25</release>) so the plugin uses the --release flag for JDK 25
compatibility; ensure the plugin entry references artifactId
maven-compiler-plugin and that the new version is applied to your build/plugins
or pluginManagement section.
🧹 Nitpick comments (1)
pom.xml (1)
95-102: Consider updating maven-javadoc-plugin and deprecated parameter.The
<additionalparam>configuration element was deprecated in maven-javadoc-plugin 3.0.0 and replaced with<additionalOptions>. Consider updating the plugin version and parameter name.♻️ Proposed update
<plugin> <artifactId>maven-javadoc-plugin</artifactId> - <version>2.9.1</version> + <version>3.6.3</version> <executions> <execution> <id>attach-javadocs</id> <goals><goal>jar</goal></goals> <configuration> - <additionalparam>-Xdoclint:none</additionalparam> + <additionalOptions>-Xdoclint:none</additionalOptions> </configuration> </execution> </executions> </plugin>
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/ci.ymlpom.xml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/ci.yml
🔇 Additional comments (1)
pom.xml (1)
46-47: Java 8 upgrade looks good, but verify the cross-compilation strategy.The upgrade from Java 1.6 to Java 8 is a positive modernization step. However, ensure that compiling with JDK 25 (as mentioned in the commit message) while targeting Java 8 bytecode works correctly across all test matrix environments (Java 8, 11, 17, 21).
Consider using the
--release 8flag instead ofsourceandtargetfor more reliable cross-compilation, as it ensures the compiled code uses only APIs available in Java 8. This requires maven-compiler-plugin 3.6 or newer (see previous comment about updating the plugin).
| @@ -43,8 +43,8 @@ | |||
| <artifactId>maven-compiler-plugin</artifactId> | |||
| <version>3.1</version> | |||
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
maven-compiler-plugin latest version 2026 JDK 25
💡 Result:
Latest stable Maven Compiler Plugin (as of Jan 7, 2026): 3.14.1. [1][2]
JDK 25 support: 3.14.1 includes fixes to enable working with JDK 25, but some users still report JDK‑25 compatibility errors in certain setups. If you need bleeding‑edge support, there is a 4.0.0‑beta line (requires newer Maven/JDK) you can evaluate. Test your build (or use toolchains) and upgrade to 3.14.1 (or try 4.x beta) if you encounter JDK‑25 issues. [3][4]
Sources:
- Plugin download / current stable: maven‑compiler‑plugin 3.14.1. [1]
- Plugin docs / compile goal shows 3.14.1 as current stable. [2]
- Release discussion noting fixes for JDK 25 and ongoing issues. [3]
- 4.0.0‑beta docs (4.x branch). [4]
🌐 Web query:
maven-compiler-plugin 3.1 JDK 25 support compatibility
💡 Result:
Short answer: No — maven-compiler-plugin 3.1 (released 2013) does not support Java 25 or the modern --release handling for recent Java versions. Use a recent plugin release (3.6+ for early Java 9 support and preferably a current 3.13+/4.x release) and set <maven.compiler.release>25 (or 25) while running Maven on a JDK 25. [1][2][3]
Sources:
- maven-compiler-plugin 3.1 plugin page (release 2013). [1]
- Compiler plugin docs on using --release / maven.compiler.release (current archives and 4.x docs). [2][3]
🌐 Web query:
maven-compiler-plugin --release flag minimum version requirement
💡 Result:
The maven-compiler-plugin added the (javac --release) option in version 3.6. Note: the javac --release JVM option itself requires JDK 9+, and plugin 3.13.0 added special handling so the plugin can accept the release property when running on JDK 8 (it will map to source/target). [1][2]
Sources:
- Plugin documentation (compile mojo) — since 3.6. [1]
- Plugin docs for release usage / JDK‑8 behavior (3.13.0 notes). [2]
Update maven-compiler-plugin to 3.14.1 for JDK 25 compatibility.
The maven-compiler-plugin version 3.1 (from 2013) does not support JDK 25. The CI workflow uses JDK 25 for compilation, so this plugin must be upgraded to avoid build failures or incorrect bytecode generation.
🔧 Recommended update
- <version>3.1</version>
+ <version>3.14.1</version>Additionally, use the --release flag instead of source/target for better cross-compilation guarantees (requires plugin 3.6+):
<configuration>
- <source>8</source>
- <target>8</target>
+ <release>8</release>
</configuration>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <version>3.1</version> | |
| <version>3.14.1</version> |
🤖 Prompt for AI Agents
In @pom.xml at line 44, Replace the old maven-compiler-plugin version 3.1 with
3.14.1 in the pom (update the <version> under the maven-compiler-plugin plugin
definition) and switch any <source>/<target> configuration to the <release>
setting (e.g., <release>25</release>) so the plugin uses the --release flag for
JDK 25 compatibility; ensure the plugin entry references artifactId
maven-compiler-plugin and that the new version is applied to your build/plugins
or pluginManagement section.
0448a6f to
2ae16a4
Compare
Summary
This PR upgrades the minimum Java version and adds GitHub Actions CI for automated testing.
Changes
Java Version Upgrade
Test Fixes for Modern JDK
staticinHooksTest.javato avoid reflection issuesGsonfield astransientto prevent serialization of internal ThreadLocal fieldsInaccessibleObjectExceptionerrors on JDK 16+GitHub Actions CI
.github/workflows/ci.ymlwith a CI pipeline that:Branch Protection Setup
After merging, configure branch protection rules in Settings → Branches:
masterbranchRun Testsjob as a required checkThis will block PR merging if tests fail.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.