(obj: jobject, jni_env: *mut JNIEnv)
| 343 | } |
| 344 | |
| 345 | pub(crate) unsafe fn i16_from_jobject(obj: jobject, jni_env: *mut JNIEnv) -> errors::Result<i16> { |
| 346 | if obj.is_null() { |
| 347 | Err(errors::J4RsError::JniError( |
| 348 | "Attempt to create an i16 from null".to_string(), |
| 349 | )) |
| 350 | } else { |
| 351 | let v = (opt_to_res(cache::get_jni_call_short_method())?)( |
| 352 | jni_env, |
| 353 | obj, |
| 354 | cache::get_short_to_short_method()?, |
| 355 | ); |
| 356 | Ok(v as i16) |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | pub(crate) unsafe fn u16_from_jobject(obj: jobject, jni_env: *mut JNIEnv) -> errors::Result<u16> { |
| 361 | if obj.is_null() { |
nothing calls this directly
no test coverage detected