Skip to content

Upgrade project to Java 26#488

Open
rob93c wants to merge 4 commits intomainfrom
upgrade-to-jdk-26
Open

Upgrade project to Java 26#488
rob93c wants to merge 4 commits intomainfrom
upgrade-to-jdk-26

Conversation

@rob93c
Copy link
Copy Markdown
Member

@rob93c rob93c commented Apr 10, 2026

Summary by CodeRabbit

  • Chores
    • Upgraded Java requirement from 25 → 26 across build tooling, CI, container images, documentation and analysis tooling; updated tooling download targets and CI analysis image settings.
  • Refactor
    • Minor internal cleanups and non-functional tidy-ups, including improved deterministic resource handling for background processes.

@rob93c rob93c self-assigned this Apr 10, 2026
@rob93c rob93c added documentation Improvements or additions to documentation enhancement New feature or request docker This marks issues revolving around Docker cicd The change affects CI/CD flows labels Apr 10, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fd7bde8a-fbfb-43e6-988c-9b0b0287d77a

📥 Commits

Reviewing files that changed from the base of the PR and between 03189d2 and 0000bb6.

📒 Files selected for processing (1)
  • .github/workflows/unit-test.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/unit-test.yml

📝 Walkthrough

Walkthrough

Java toolchain, runtime and tooling versions bumped from 25 → 26 across build, CI, container, analysis and docs; two Java helper methods receive small deterministic/cleanup edits. No public API changes.

Changes

Cohort / File(s) Summary
Build configuration
build.gradle, buildSrc/build.gradle, gradle/gradle-daemon-jvm.properties
Java toolchain languageVersion and daemon toolchainVersion updated 25 → 26; daemon download redirect URLs adjusted.
CI, Container & Analysis
.github/workflows/unit-test.yml, Dockerfile, qodana.yaml
CI actions/setup-java java-version updated to 26; Docker builder base image switched to eclipse-temurin:26-alpine; Qodana projectJDK set to temurin-26 and Qodana action given explicit analysis image via args.
Documentation
README.md
Project/IDE setup instructions updated to require JDK 26 (or higher).
Runtime helpers
src/main/java/com/github/stickerifier/stickerify/media/MediaHelper.java, src/main/java/com/github/stickerifier/stickerify/process/ProcessHelper.java
Minor control-flow cleanup: inline animation compliance check and remove extra blank line; Process wrapped in try-with-resources for deterministic close. No public API changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • MartelliEnrico

Poem

🐰
I hopped through code in dawn's soft mix,
Swapped twenty-five for twenty-six.
A tidy hop, a gentler race,
Builds now hum at faster pace.
This rabbit twitches whiskers—Java bliss!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title directly summarises the primary change across all modified files: upgrading the Java version from 25 to 26 throughout the project configuration.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
.github/workflows/unit-test.yml (1)

32-36: ⚠️ Potential issue | 🔴 Critical

Use a supported Java version instead of 26.

Using java-version: 26 will cause the workflow to fail immediately because Eclipse Temurin 26 binaries are not yet available. Temurin 26 is still listed as "Upcoming" on Adoptium's support roadmap and won't be released until September 2026. Switch to a currently available version such as 21 (LTS) or 23.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/unit-test.yml around lines 32 - 36, The workflow step
"name: Setup Java" uses actions/setup-java@v5 with java-version: 26 which is not
yet available; update the java-version field in that step (the "Setup Java" step
that calls actions/setup-java@v5) to a supported release such as 21 or 23 (e.g.,
set java-version to 21) so the GitHub Actions runner can successfully download a
Temurin distribution.
🧹 Nitpick comments (1)
Dockerfile (1)

11-17: Consider running the container as a non-root user.

Static analysis (Trivy DS-0002) flags that the container runs as root. Adding a non-root user improves security posture by limiting potential damage from container escapes.

🔒 Proposed fix to add non-root user
 FROM alpine:3.23.3

+RUN addgroup -S stickerify && adduser -S stickerify -G stickerify
+
 COPY --from=builder /usr/bin/ff* /usr/bin/
 COPY --from=builder /app/build/install/Stickerify/ .

+USER stickerify
+
 ENV CONCURRENT_PROCESSES=5
 CMD ["./bin/Stickerify"]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Dockerfile` around lines 11 - 17, Add and switch to a non-root user in the
Dockerfile: create a dedicated user/group (e.g., stickerify), chown the
installed app files copied from /app/build/install/Stickerify and any
/usr/bin/ff* binaries to that user, and add a USER stickerify (or the chosen
name) before the CMD ["./bin/Stickerify"]; ensure any ENV or runtime
expectations (ENV CONCURRENT_PROCESSES) still work under the non-root user and
that file permissions are set so the new user can execute ./bin/Stickerify and
read any required files.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@qodana.yaml`:
- Around line 7-8: The qodana configuration currently sets linter:
jetbrains/qodana-jvm-community:2025.3 while projectJDK: temurin-26; update the
linter or JDK so they match supported Java versions: either change the linter
value to a 2026.1+ image (e.g., jetbrains/qodana-jvm-community:2026.1) to gain
Java 26 support, or set projectJDK to temurin-25 to remain compatible with the
existing 2025.3 linter; modify the linter and/or projectJDK entries in
qodana.yaml (the linter and projectJDK keys) accordingly.

---

Outside diff comments:
In @.github/workflows/unit-test.yml:
- Around line 32-36: The workflow step "name: Setup Java" uses
actions/setup-java@v5 with java-version: 26 which is not yet available; update
the java-version field in that step (the "Setup Java" step that calls
actions/setup-java@v5) to a supported release such as 21 or 23 (e.g., set
java-version to 21) so the GitHub Actions runner can successfully download a
Temurin distribution.

---

Nitpick comments:
In `@Dockerfile`:
- Around line 11-17: Add and switch to a non-root user in the Dockerfile: create
a dedicated user/group (e.g., stickerify), chown the installed app files copied
from /app/build/install/Stickerify and any /usr/bin/ff* binaries to that user,
and add a USER stickerify (or the chosen name) before the CMD
["./bin/Stickerify"]; ensure any ENV or runtime expectations (ENV
CONCURRENT_PROCESSES) still work under the non-root user and that file
permissions are set so the new user can execute ./bin/Stickerify and read any
required files.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 11135872-7341-4fa2-876d-d216f088c480

📥 Commits

Reviewing files that changed from the base of the PR and between a9804e6 and ae8d8fb.

📒 Files selected for processing (7)
  • .github/workflows/unit-test.yml
  • Dockerfile
  • README.md
  • build.gradle
  • buildSrc/build.gradle
  • gradle/gradle-daemon-jvm.properties
  • qodana.yaml

@rob93c rob93c marked this pull request as ready for review April 10, 2026 11:56
@rob93c rob93c requested a review from MartelliEnrico April 10, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cicd The change affects CI/CD flows docker This marks issues revolving around Docker documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant