MCPcopy Index your code
hub / github.com/cedar-policy/cedar-java / toJsonJni

Function toJsonJni

CedarJavaFFI/src/interface.rs:830–835  ·  view source on GitHub ↗
(mut env: JNIEnv<'a>, _: JClass, policy_jstr: JString<'a>)

Source from the content-addressed store, hash-verified

828
829#[jni_fn("com.cedarpolicy.model.policy.Policy")]
830pub 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
837fn to_json_internal<'a>(env: &mut JNIEnv<'a>, policy_jstr: JString<'a>) -> Result<JValueOwned<'a>> {
838 if policy_jstr.is_null() {

Callers

nothing calls this directly

Calls 4

to_json_internalFunction · 0.85
jni_failedFunction · 0.85
as_jniMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected