Bug 1532 - UnsafeUtil: Remove usage of deprecated field `sun.misc.Unsafe::objectFieldOffset` (JDK 24 warning)
Summary: UnsafeUtil: Remove usage of deprecated field `sun.misc.Unsafe::objectFieldOff...
Status: RESOLVED FIXED
Alias: None
Product: Gluegen
Classification: JogAmp
Component: core (show other bugs)
Version: 2.6.0
Hardware: All all
: P4 normal
Assignee: Sven Gothel
URL:
Depends on: 1523
Blocks:
  Show dependency treegraph
 
Reported: 2025-08-30 11:54 CEST by Sven Gothel
Modified: 2025-08-30 11:58 CEST (History)
0 users

See Also:
Type: FEATURE
SCM Refs:
gluegen 24e6a89e203f61dfbbdea7425a920b53595881f5 jocl 6d9649249b40e1ac880288bbad144649170092df
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2025-08-30 11:54:40 CEST
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.jogamp.common.util.UnsafeUtil$1 (file:/usr/local/projects/JogAmp/gluegen/build-macosx/gluegen-rt.jar)
WARNING: Please consider reporting this to the maintainers of class com.jogamp.common.util.UnsafeUtil$1
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release

+++

Usage of this field was introduced in commit 303a6701c2b643d5579a5b88a101a53ccba9f90c
for Bug 1523.

This also implies removing `addressFieldOffset` 
and hence `getDirectBufferAddress` method,
as it uses the `objectFieldOffset` method to fetch the field.

Users shall simply use `Buffers.getDirectBufferAddress(niobuffer);`
Comment 1 Sven Gothel 2025-08-30 11:58:51 CEST
resolved as described