Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes the Options around the function pointers
None of the JNI 1.1 function pointers were optional, and neither are any of the function pointers in later versions of the spec. Having the `Option` implies that null pointer checks are required but more notably, they suggest that null pointer checks could be used for JNI >= 1.2 pointers, which could be a dangerous mistake since these are effectively extending beyond the table of pointers that was defined for JNI 1.1 and should be assumed to be invalid pointers that mustn't be touched. It's also notable that we have to call `GetVersion` to determine the full set of pointers that are valid. The original 1.1 spec did leave some gaps in the original table that where filled with NULLs these were only to be used in future versions (so there is never any optional pointer). Recently the use of `Option` also raised some questions about our ability to, infallibly, handle Rust panics when we want to map a panic to a Java exception via JNI: jni-rs/jni-rs#432 (comment)
- Loading branch information