dependabot[bot] opened a new pull request, #2019: URL: https://github.com/apache/auron/pull/2019
Bumps [jni](https://github.com/jni-rs/jni-rs) from 0.20.0 to 0.22.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jni-rs/jni-rs/releases">jni's releases</a>.</em></p> <blockquote> <h2>Release JNI 0.22.0</h2> <p>The 0.22 release significantly improves safety and ergonomics through changes to thread attachment, environment handling, and the addition of compile-time macros for JNI strings, signatures as well as full Java type bindings.</p> <p>Please see the <a href="https://github.com/jni-rs/jni-rs/blob/master/crates/jni/docs/0.22-MIGRATION.md">jni 0.22 Migration Guide</a> for guidance on how to update from jni 0.21</p> <h3>Added</h3> <h4>JavaVM / Thread Attachment APIs</h4> <ul> <li><code>JavaVM::singleton()</code> lets you acquire the <code>JavaVM</code> for the process when you know that the <code>JavaVM</code> singleton has been initialized (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/595">#595</a>)</li> <li><code>JavaVM::is_thread_attached</code> can query whether the current thread is attached to the Java VM (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/570">#570</a>)</li> <li><code>AttachGuard::from_unowned</code> added as a low-level (unsafe) way to represent a thread attachment with a raw <code>jni_sys::Env</code> pointer (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/570">#570</a>)</li> <li><code>AttachConfig</code> exposes fine-grained control over thread attachment including <code>Thread</code> name, <code>ThreadGroup</code> and whether scoped or permanent. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/606">#606</a>)</li> <li><code>JavaVM::attach_current_thread_guard</code> is a low-level (unsafe) building block for attaching threads that exposes the <code>AttachGuard</code> and <code>AttachConfig</code> control. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/606">#606</a>)</li> <li><code>JavaVM::attach_current_thread_with_config</code> is a safe building block for attaching threads that hides the <code>AttachGuard</code> but exposes <code>AttachConfig</code> control. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/606">#606</a>)</li> <li><code>JavaVM::with_local_frame</code> added as method to borrow a <code>Env</code> that is already attached to the current thread, after pushing a new JNI stack frame (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/570">#570</a>, <a href="https://redirect.github.com/jni-rs/jni-rs/pull/673">#673</a>)</li> <li><code>JavaVM::with_top_local_frame_frame</code> added to borrow a <code>Env</code> for the top JNI stack frame (i.e. without pushing a new JNI stack frame) (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/570">#570</a>, <a href="https://redirect.github.com/jni-rs/jni-rs/pull/673">#673</a>)</li> </ul> <h4>Reference Type APIs</h4> <ul> <li>A <code>Reference</code> trait for all reference types like <code>JObject</code>, <code>JClass</code>, <code>JString</code>, enabling <code>Global</code> and <code>Weak</code> to be generic over <code>Reference</code> and enabling safe casting and global caching of <code>JClass</code> references. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/596">#596</a>)</li> <li><code>Reference::lookup_class</code> exposes a cached <code>Global<JClass></code> for all <code>Reference</code> implementations (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>LoaderContext</code> + <code>LoaderContext::load_class</code> for loading classes, depending on available context (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>Env::new_cast_global_ref</code> acts like <code>new_global_ref</code> with a type cast (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>Env::cast_global</code> takes an owned <code>Global<From></code> and returns an owned <code>Global<To></code> (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>Env::new_cast_local_ref</code> acts like <code>new_local_ref</code> with a type cast (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>Env::cast_local</code> takes an owned local reference and returns a new type-cast wrapper (owned) (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>Env::as_cast</code> or <code>Cast::new</code> borrows any <code>From: Reference</code> (global or local) reference and returns a <code>Cast<To></code> that will Deref into <code>&To</code> (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>Env::as_cast_unchecked</code> returns a <code>Cast<To></code> like <code>as_cast()</code> but without a runtime <code>IsInstanceOf</code> check (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/669">#669</a>)</li> <li><code>Env::as_cast_raw</code> or <code>Cast::from_raw</code> borrows a raw <code>jobject</code> reference and returns a <code>Cast<To></code> that will Deref into <code>&To</code></li> <li><code>Cast::new_unchecked</code> and <code>Cast::from_raw_unchecked</code> let you borrow a reference with an (<code>unsafe</code>) type cast, with no runtime check</li> <li><code>::cast_local()</code> methods as a convenience for all reference types, such as <code>let s = JString::cast_local(obj)</code></li> <li><code>const</code> <code>null()</code> methods for all reference types.</li> <li><code>Global::null()</code> and <code>Weak::null()</code> construct null references (equivalent to <code>Default::default()</code>). (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/596">#596</a>)</li> </ul> <h4>JNI Environment APIs</h4> <ul> <li><code>Env::call_nonvirtual_method</code> and <code>Env::call_nonvirtual_method_unchecked</code> to call non-virtual method. (<a href="https://redirect.github.com/jni-rs/jni-rs/issues/454">#454</a>)</li> <li><code>Env::to_reflected_method</code> and <code>Env::to_reflected_static_method</code> for retrieving the Java reflection API instance for a method or constructor. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/579">#579</a>)</li> <li><code>Env::throw_new_void</code> provides an easy way to throw an exception that's constructed with no message argument</li> <li><code>Env::new_object_type_array<E></code> lets you you instantiate a <code>JObjectArray</code> with a given element type like <code>new_object_type_array::<JString></code></li> <li><code>Env::load_class</code> supports class lookups via the current <code>Thread</code> context class loader, with <code>FindClass</code> fallback. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/674">#674</a>)</li> <li><code>MethodSignature</code> and <code>FieldSignature</code> types have been added for compile-time parsed JNI method and field signatures</li> </ul> <h4>Native Method APIs</h4> <ul> <li><code>EnvUnowned</code> is an FFI-safe type that can be used to capture a <code>jni_sys::Env</code> pointer given to native methods and give it a named lifetime (this can then be temporarily upgraded to a <code>&mut Env</code> reference via <code>EnvUnowned::with_env</code>) (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/570">#570</a>)</li> <li><code>Outcome</code> is like a <code>Result</code> with the addition of a third <code>Panic()</code> variant, used for careful handling of errors in native methods. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/664">#664</a>)</li> <li><code>EnvOutcome</code> represents an <code>EnvUnowned::with_env</code> outcome whose errors can be handle, with access to JNI, via an <code>ErrorPolicy</code>. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/664">#664</a>)</li> <li><code>ErrorPolicy</code> is a trait with <code>on_error</code> and <code>on_panic</code> methods that can log native method errors or throw them as exceptions. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/664">#664</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jni-rs/jni-rs/blob/master/CHANGELOG.md">jni's changelog</a>.</em></p> <blockquote> <h2>[0.22.0] — 2026-02-17</h2> <h3>Added</h3> <h4>JavaVM / Thread Attachment APIs</h4> <ul> <li><code>JavaVM::singleton()</code> lets you acquire the <code>JavaVM</code> for the process when you know that the <code>JavaVM</code> singleton has been initialized (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/595">#595</a>)</li> <li><code>JavaVM::is_thread_attached</code> can query whether the current thread is attached to the Java VM (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/570">#570</a>)</li> <li><code>AttachGuard::from_unowned</code> added as a low-level (unsafe) way to represent a thread attachment with a raw <code>jni_sys::Env</code> pointer (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/570">#570</a>)</li> <li><code>AttachConfig</code> exposes fine-grained control over thread attachment including <code>Thread</code> name, <code>ThreadGroup</code> and whether scoped or permanent. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/606">#606</a>)</li> <li><code>JavaVM::attach_current_thread_guard</code> is a low-level (unsafe) building block for attaching threads that exposes the <code>AttachGuard</code> and <code>AttachConfig</code> control. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/606">#606</a>)</li> <li><code>JavaVM::attach_current_thread_with_config</code> is a safe building block for attaching threads that hides the <code>AttachGuard</code> but exposes <code>AttachConfig</code> control. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/606">#606</a>)</li> <li><code>JavaVM::with_local_frame</code> added as method to borrow a <code>Env</code> that is already attached to the current thread, after pushing a new JNI stack frame (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/570">#570</a>, <a href="https://redirect.github.com/jni-rs/jni-rs/pull/673">#673</a>)</li> <li><code>JavaVM::with_top_local_frame_frame</code> added to borrow a <code>Env</code> for the top JNI stack frame (i.e. without pushing a new JNI stack frame) (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/570">#570</a>, <a href="https://redirect.github.com/jni-rs/jni-rs/pull/673">#673</a>)</li> </ul> <h4>Reference Type APIs</h4> <ul> <li>A <code>Reference</code> trait for all reference types like <code>JObject</code>, <code>JClass</code>, <code>JString</code>, enabling <code>Global</code> and <code>Weak</code> to be generic over <code>Reference</code> and enabling safe casting and global caching of <code>JClass</code> references. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/596">#596</a>)</li> <li><code>Reference::lookup_class</code> exposes a cached <code>Global<JClass></code> for all <code>Reference</code> implementations (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>LoaderContext</code> + <code>LoaderContext::load_class</code> for loading classes, depending on available context (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>Env::new_cast_global_ref</code> acts like <code>new_global_ref</code> with a type cast (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>Env::cast_global</code> takes an owned <code>Global<From></code> and returns an owned <code>Global<To></code> (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>Env::new_cast_local_ref</code> acts like <code>new_local_ref</code> with a type cast (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>Env::cast_local</code> takes an owned local reference and returns a new type-cast wrapper (owned) (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>Env::as_cast</code> or <code>Cast::new</code> borrows any <code>From: Reference</code> (global or local) reference and returns a <code>Cast<To></code> that will Deref into <code>&To</code> (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/612">#612</a>)</li> <li><code>Env::as_cast_unchecked</code> returns a <code>Cast<To></code> like <code>as_cast()</code> but without a runtime <code>IsInstanceOf</code> check (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/669">#669</a>)</li> <li><code>Env::as_cast_raw</code> or <code>Cast::from_raw</code> borrows a raw <code>jobject</code> reference and returns a <code>Cast<To></code> that will Deref into <code>&To</code></li> <li><code>Cast::new_unchecked</code> and <code>Cast::from_raw_unchecked</code> let you borrow a reference with an (<code>unsafe</code>) type cast, with no runtime check</li> <li><code>::cast_local()</code> methods as a convenience for all reference types, such as <code>let s = JString::cast_local(obj)</code></li> <li><code>const</code> <code>null()</code> methods for all reference types.</li> <li><code>Global::null()</code> and <code>Weak::null()</code> construct null references (equivalent to <code>Default::default()</code>). (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/596">#596</a>)</li> </ul> <h4>JNI Environment APIs</h4> <ul> <li><code>Env::call_nonvirtual_method</code> and <code>Env::call_nonvirtual_method_unchecked</code> to call non-virtual method. (<a href="https://redirect.github.com/jni-rs/jni-rs/issues/454">#454</a>)</li> <li><code>Env::to_reflected_method</code> and <code>Env::to_reflected_static_method</code> for retrieving the Java reflection API instance for a method or constructor. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/579">#579</a>)</li> <li><code>Env::throw_new_void</code> provides an easy way to throw an exception that's constructed with no message argument</li> <li><code>Env::new_object_type_array<E></code> lets you you instantiate a <code>JObjectArray</code> with a given element type like <code>new_object_type_array::<JString></code></li> <li><code>Env::load_class</code> supports class lookups via the current <code>Thread</code> context class loader, with <code>FindClass</code> fallback. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/674">#674</a>)</li> <li><code>MethodSignature</code> and <code>FieldSignature</code> types have been added for compile-time parsed JNI method and field signatures</li> </ul> <h4>Native Method APIs</h4> <ul> <li><code>EnvUnowned</code> is an FFI-safe type that can be used to capture a <code>jni_sys::Env</code> pointer given to native methods and give it a named lifetime (this can then be temporarily upgraded to a <code>&mut Env</code> reference via <code>EnvUnowned::with_env</code>) (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/570">#570</a>)</li> <li><code>Outcome</code> is like a <code>Result</code> with the addition of a third <code>Panic()</code> variant, used for careful handling of errors in native methods. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/664">#664</a>)</li> <li><code>EnvOutcome</code> represents an <code>EnvUnowned::with_env</code> outcome whose errors can be handle, with access to JNI, via an <code>ErrorPolicy</code>. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/664">#664</a>)</li> <li><code>ErrorPolicy</code> is a trait with <code>on_error</code> and <code>on_panic</code> methods that can log native method errors or throw them as exceptions. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/664">#664</a>)</li> <li><code>ThrowRuntimeExAndDefault</code> is an <code>ErrorPolicy</code> that throws any error as a <code>RuntimeException</code> (and returns a default value). (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/664">#664</a>)</li> <li><code>LogErrorAndDefault</code> is an <code>ErrorPolicy</code> that logs errors and returns a default value. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/664">#664</a>)</li> <li><code>LogContextErrorAndDefault</code> is an <code>ErrorPolicy</code> that logs errors, with a given context string, and returns a default value. (<a href="https://redirect.github.com/jni-rs/jni-rs/pull/664">#664</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jni-rs/jni-rs/commit/779a9b419ac4b7f1be90d67d1ccb6cce0f84a8af"><code>779a9b4</code></a> Release jni 0.22</li> <li><a href="https://github.com/jni-rs/jni-rs/commit/7801d19eae90a2833f471e3130ed6c2a0a9c2769"><code>7801d19</code></a> Inline assert_top checks</li> <li><a href="https://github.com/jni-rs/jni-rs/commit/023aa582188eecac351600e889a19025b1e2f491"><code>023aa58</code></a> cargo publish --dry-run fixes</li> <li><a href="https://github.com/jni-rs/jni-rs/commit/71875bab3da0cbfd515a77b1a0e47ffc3423fffe"><code>71875ba</code></a> env: fix load_class example</li> <li><a href="https://github.com/jni-rs/jni-rs/commit/7c5414d984f611b1e7f21eedf7c5af4e96da5711"><code>7c5414d</code></a> Update jni lib.rs example docs</li> <li><a href="https://github.com/jni-rs/jni-rs/commit/d04db59a7a41b4b843b8d42f01d2a5e2b74b9d29"><code>d04db59</code></a> Move crates/jni/example -> crates/jni/mylib-example</li> <li><a href="https://github.com/jni-rs/jni-rs/commit/6da05fb66791881f4a80785d3abf0ae4e841ef87"><code>6da05fb</code></a> Build 0.22-MIGRATION.md examples as doc tests</li> <li><a href="https://github.com/jni-rs/jni-rs/commit/2f4d3491b9708d2838c855dbbee6101d4c65cbd2"><code>2f4d349</code></a> Link to JNI spec in native_method macro docs</li> <li><a href="https://github.com/jni-rs/jni-rs/commit/362f7d2b556fa75332e3a288ed7da7106d3759a7"><code>362f7d2</code></a> tweak jni_sig docs</li> <li><a href="https://github.com/jni-rs/jni-rs/commit/4293ff62331af9cc83138dded1b145f2d96df3ca"><code>4293ff6</code></a> Add Env::call_method example to rustdocs</li> <li>Additional commits viewable in <a href="https://github.com/jni-rs/jni-rs/compare/v0.20.0...v0.22.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
