Skip to content

feat: upgrade to Java 25#771

Merged
anthony-swirldslabs merged 3 commits intomainfrom
750-java25
Apr 3, 2026
Merged

feat: upgrade to Java 25#771
anthony-swirldslabs merged 3 commits intomainfrom
750-java25

Conversation

@anthony-swirldslabs
Copy link
Copy Markdown
Contributor

Description:
The upgrade is motivated by warnings about the sun.misc.Unsafe usages that get printed when a client application using the PBJ runs on modern Java. Methods in the Unsafe class are terminally deprecated and will be removed in a future JDK version. So we have to replace their usages with modern alternatives.

I'm using the VarHandle (Java 9+) to access arrays. Also, I'm using MemorySegment (Java 22+) for operations on buffers.

Since this is a breaking change, I'm bumping the snapshot version to 0.15.0 and will release this new version once the PR is merged.

Related issue(s):

Fixes #750

Notes for reviewer:
All tests, both unit and integration, pass.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Anthony Petrov <anthony@swirldslabs.com>
Signed-off-by: Anthony Petrov <anthony@swirldslabs.com>
Signed-off-by: Anthony Petrov <anthony@swirldslabs.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

JUnit Test Report

   79 files  ±0     79 suites  ±0   3m 23s ⏱️ -59s
1 354 tests ±0  1 350 ✅ ±0   4 💤 ±0  0 ❌ ±0 
7 236 runs  ±0  7 216 ✅ ±0  20 💤 ±0  0 ❌ ±0 

Results for commit 5877ae3. ± Comparison against base commit c38d91b.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Integration Test Report

    419 files  ±0      419 suites  ±0   23m 54s ⏱️ + 5m 15s
114 982 tests ±0  114 982 ✅ ±0  0 💤 ±0  0 ❌ ±0 
115 224 runs  ±0  115 224 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 5877ae3. ± Comparison against base commit c38d91b.

Copy link
Copy Markdown
Contributor

@andrewb1269 andrewb1269 left a comment

Choose a reason for hiding this comment

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

Approve the workflow files.

@anthony-swirldslabs anthony-swirldslabs merged commit e00c29e into main Apr 3, 2026
16 checks passed
@anthony-swirldslabs anthony-swirldslabs deleted the 750-java25 branch April 3, 2026 00:16
This was referenced Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Usage of Unsafe produces warnings in Java25

4 participants