(
env: &mut JNIEnv<'a>,
annotations: impl Iterator<Item = (&'b str, &'b str)>,
)
| 781 | } |
| 782 | |
| 783 | fn create_java_map_from_annotations<'a, 'b>( |
| 784 | env: &mut JNIEnv<'a>, |
| 785 | annotations: impl Iterator<Item = (&'b str, &'b str)>, |
| 786 | ) -> JObject<'a> { |
| 787 | let mut map = Map::new(env).unwrap(); |
| 788 | |
| 789 | for (annotation_key, annotation_value) in annotations { |
| 790 | let key: JString = env.new_string(annotation_key).unwrap().into(); |
| 791 | let value: JString = env.new_string(annotation_value).unwrap().into(); |
| 792 | map.put(env, key, value).unwrap(); |
| 793 | } |
| 794 | |
| 795 | map.into_inner() |
| 796 | } |
| 797 | |
| 798 | #[jni_fn("com.cedarpolicy.model.policy.Policy")] |
| 799 | pub fn parsePolicyTemplateJni<'a>( |
no test coverage detected