Skip to content

fix: does not break class loading if direct buffer allocator is not available#1006

Closed
torito wants to merge 1 commit intoapache:mainfrom
torito:catch-jpms-failure
Closed

fix: does not break class loading if direct buffer allocator is not available#1006
torito wants to merge 1 commit intoapache:mainfrom
torito:catch-jpms-failure

Conversation

@torito
Copy link

@torito torito commented Feb 5, 2026

What's Changed

The Direct Buffer is not always needed to use Arrow memory, however, we cannot load MemoryUtil class if we don't set:

--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED

Which is not always needed/possible.

This fix proposes to catch the InaccessibleObjectException to not avoiding the load of the class.

The directBuffer is, in any case not available and a UnsupportedOperationException will be throw as it is in the existing code

Closes #1007 .

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.

Unable to load MemoryUtil class if we dont set --add-opens

1 participant