pburka opened a new issue, #35053:
URL: https://github.com/apache/arrow/issues/35053
### Describe the bug, including details regarding any error messages,
version, and platform.
On an early access build of Java 21, I'm seeing some failures in Apache
Arrow tests. The same tests work on Java 17, 18, 19 and 20.
Test failures all look like this:
```
java.lang.UnsupportedOperationException: sun.misc.Unsafe or
java.nio.DirectByteBuffer.<init>(long, int) not available
org.apache.arrow.memory.util.MemoryUtil.directBuffer(MemoryUtil.java:167)
org.apache.arrow.memory.ArrowBuf.getDirectBuffer(ArrowBuf.java:228)
org.apache.arrow.memory.ArrowBuf.nioBuffer(ArrowBuf.java:223)
org.apache.arrow.vector.ipc.ReadChannel.readFully(ReadChannel.java:87)
org.apache.arrow.vector.ipc.message.MessageSerializer.readMessageBody(MessageSerializer.java:727)
org.apache.arrow.vector.ipc.message.MessageChannelReader.readNext(MessageChannelReader.java:67)
org.apache.arrow.vector.ipc.ArrowStreamReader.loadNextBatch(ArrowStreamReader.java:145)
```
From a brief investigation, it looks like the private `(long, int)`
constructor has been replaced with a `(long, long)` constructor in Java 21.
(See
https://github.com/openjdk/jdk/blob/42fa000a7d042e425913aab2842f8166a0c2172a/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template#L180-L188
and
https://github.com/openjdk/jdk/commit/a56598f5a534cc9223367e7faa8433ea38661db9)
### Component(s)
Java
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]