protocolbuffers / protocolbuffers/protobuf
Warnings about terminally deprecated `Unsafe` usage
Open
@esrauchg is already working on this.
Since Sep 17, 2025.
java
keep open
- Dominant language
- C++
- Stars
- 72k
- Forks
- 16.3k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 140
Description
What version of protobuf and what language are you using?
Version: 30.1
Language: C++/Java/Python/C#/Ruby/PHP/Objective-C/Javascript
What operating system (Linux, Windows, ...) and version?
Any
What runtime / compiler are you using (e.g., python version or gcc version)
JDK 24
What did you do?
Use Protobuf generated messages.
What did you expect to see
No warnings
What did you see instead?
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by com.google.protobuf.UnsafeUtil$MemoryAccessor (file:/redacted/some.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.protobuf.UnsafeUtil$MemoryAccessor
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
Anything else we should know about your project / environment
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.