hutiefang76 opened a new pull request, #1390: URL: https://github.com/apache/arrow-java/pull/1390
## What's Changed The C Data release callbacks invoke `PrivateData.close()` through `CallObjectMethod`, although its JNI descriptor is `()V`. With OpenJ9's JNI checks enabled, releasing an exported array, schema or stream can abort the JVM. Use `CallVoidMethod` in both callbacks, preserving the existing exception handling and native cleanup. Add release lifecycle tests for all three exported structures: close exactly once, repeated release, cleared native pointers, cleanup when Java close throws, and a real nested-vector export with no retained allocator memory. Validation: - Linux aarch64, IBM Semeru OpenJ9 21.0.12.1: the unchanged JNI library aborts with `JVMJNCK046E` (wrong return type `V`) under `-Xcheck:jni`. Rebuilding the library with this fix makes the same 7 cases pass without JNI check errors. The test source is identical before and after the fix. Both fatal and nonfatal checking modes were run. - macOS arm64, HotSpot 21.0.10: rebuilt the native library and ran `mvn -B -ntp -Dmaven.gitcommitid.nativegit=true -Parrow-c-data -pl c -am verify`, supplying the built JNI library through `arrow.c.jni.dist.dir` and `arrow.cdata.library.path`. All 117 C Data cases passed with no skips. Dependency modules also passed; vector ran 1191 cases in each configured allocator execution, with 4 skips per execution and no failures or errors. - Spotless and Checkstyle passed. No build configuration or public API changes. Closes #1385. Maintainer note: my account cannot add repository labels. Please add `bug-fix` and approve any workflows awaiting approval when appropriate. Hosted CI and maintainer review remain pending. <sub>AI-generated PR description. Investigation, implementation and automated review assisted by Codex and DeepSeek.</sub> -- 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]
