(mut env: JNIEnv<'a>, _: JClass, policy_jstr: JString<'a>)
| 828 | |
| 829 | #[jni_fn("com.cedarpolicy.model.policy.Policy")] |
| 830 | pub fn toJsonJni<'a>(mut env: JNIEnv<'a>, _: JClass, policy_jstr: JString<'a>) -> jvalue { |
| 831 | match to_json_internal(&mut env, policy_jstr) { |
| 832 | Err(e) => jni_failed(&mut env, e.as_ref()), |
| 833 | Ok(policy_json) => policy_json.as_jni(), |
| 834 | } |
| 835 | } |
| 836 | |
| 837 | fn to_json_internal<'a>(env: &mut JNIEnv<'a>, policy_jstr: JString<'a>) -> Result<JValueOwned<'a>> { |
| 838 | if policy_jstr.is_null() { |
nothing calls this directly
no test coverage detected