apache / apache/arrow-java

Memory-Access Methods in sun.misc.Unsafe are deprecated for removal

Abierto
#511 4 comentarios 1 reacción 1 asignado Reclamado por @jbonofre Ver en GitHub
Type: bug
Lenguaje dominante
Java
Estrellas
94
Forks
152
Merge medio
3 d 16 h
PR fusionados (30 d)
11

Descripción

### Describe the bug, including details regarding any error messages, version, and platform.

In JDK 24, [JEP 498: Warn upon Use of Memory-Access Methods in sun.misc.Unsafe](https://openjdk.org/jeps/498) deprecates several memory access methods in `sun.misc.Unsafe` for removal.

These methods are used by arrow here https://github.com/laurentgo/arrow/blob/fa8ebdebd1109217a6ac1ae2f173e1ab9d400d82/java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/MemoryUtil.java#L30

https://github.com/apache/arrow/issues/43479 is related, it refactored uses of these APIs to consolidate the references in `MemoryUtil`, and mentions that change is

> a first step towards switching from sun.misc.Unsafe to safer memory access methods (which may become a requirement at some point as discussed in [JEP 471](https://openjdk.org/jeps/471) )

Are there plans to switch to safer memory access methods?

### Component(s)

Java

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.