All Versions
Latest Version
Avg Release Cycle
60 days
Latest Release
95 days ago

Changelog History
Page 1

  • v0.16.0

    February 28, 2020

    🛠 Fixed

    • 🍎 Java VM instantiation with some MacOS configurations. (#220, #229, #230).
  • v0.15.0

    February 28, 2020

    ➕ Added

    • 👷 Ability to pass object wrappers that are convertible to JObject as arguments to the majority of JNIEnv methods without explicit conversion (#213)
    • JNIEnv#is_same_object implementation (#213)
    • JNIEnv#register_native_methods (#214)
    • 👷 Conversion from Into<JObject> to JValue::Object

    🛠 Fixed

    • Passing null as class loader to define_class method now allowed according to the JNI specification. (#225)
  • v0.14.0

    October 31, 2019
    • 😌 Relaxed some lifetime restrictions in JNIEnv to support the case when method, field ids; and global references to classes have a different (larger) lifetime than JNIEnv (#209)
  • v0.13.1

    August 22, 2019

    🔄 Changed

    • 📚 Various documentation improvements.
  • v0.13.0

    July 05, 2019

    0.13 brings major improvements in thread management, allowing to attach the native threads
    permanently and safely; Executor for extra convenience and safety; and other
    👌 improvements and fixes.

    📚 ⚠️ If your code attaches native threads — make sure to check the updated documentation
    📄 of JavaVM to learn about the new features!

    ➕ Added

    • JavaVM::attach_current_thread_permanently method, which attaches the current
      thread and detaches it when the thread finishes. Daemon threads attached
      with JavaVM::attach_current_thread_as_daemon also automatically detach themselves
      when finished. The number of currently attached threads may be acquired using
      JavaVM::threads_attached method. (#179, #180)
    • Executor — a simple thread attachment manager which helps to safely
      🆓 execute a closure in attached thread context and to automatically free
      created local references at closure exit. (#186)

    🔄 Changed

    • 0️⃣ The default JNI API version in InitArgsBuilder from V1 to V8. (#178)
    • Extended the lifetimes of AutoLocal to make it more flexible. (#190)
    • 0️⃣ Default exception type from checked java.lang.Exception to unchecked java.lang.RuntimeException.
      👻 It is used implicitly when JNIEnv#throw is invoked with exception message:
      👻 env.throw("Exception message"); however, for efficiency reasons, it is recommended
      to specify the exception type explicitly and use throw_new:
      🆕 env.throw_new(exception_type, "Exception message"). (#194)

    🛠 Fixed

    • Native threads attached with JavaVM::attach_current_thread_as_daemon now automatically detach
      themselves on exit, preventing Java Thread leaks. (#179)
    • Local reference leaks in JList, JMap and JMapIter. (#190, #191)
  • v0.12.3

    May 24, 2019

    ➕ Added

    • From<jboolean> implementation for JValue (#173)
    • Debug trait for InitArgsBuilder. (#175)
    • InitArgsBuilder#options returning the collected JVM options. (#177)
  • v0.12.2

    May 02, 2019

    🔄 Changed

    • 📚 Updated documentation of GetXArrayRegion methods (#169)
    • 👌 Improved ABI compatibility on various platforms (#170)
  • v0.12.1

    April 27, 2019

    🚀 This release does not bring code changes.

    🔄 Changed

    • 📚 Updated project documentation.
  • v0.12.0

    April 01, 2019

    🔄 Changed

    • JString, JMap and JavaStr and their respective iterators now require an extra lifetime so that they can now work with &'b JNIEnv<'a>, where 'a: 'b.
  • v0.11.0

    February 21, 2019


    🚀 This release brings various improvements and fixes, outlined below. The most notable changes are:

    • 🍱 ⚠️ null is no longer represented as an Err with error kind NullPtr if it is a value of some
      nullable Java reference (not an indication of an error). Related issues: #136, #148, #163.
    • unsafe methods, providing a low-level API similar to JNI, has been marked safe and renamed
      to have _unchecked suffix. Such methods can be used to implement caching of class references
      🐎 and method IDs to improve performance in loops and frequently called Java callbacks.
      📄 If you have such, check out the docs and one of early usages
      of this feature.

    ➕ Added

    • 🏁 Invocation API support on Windows and AppVeyor CI (#149)

    🔄 Changed

    push_local_frame, delete_global_ref and release_string_utf_chars
    👻 no longer check for exceptions as they are safe
    👻 to call if there is a pending exception (#124):

    • push_local_frame will now work in case of pending exceptions — as
      the spec requires; and fail in case of allocation errors
    • delete_global_ref and release_string_utf_chars won't print incorrect
      🌲 log messages

    👀 Rename some macros to better express their intent (see #123):

    • Rename jni_call to jni_non_null_call as it checks the return value
      to be non-null.

    - Rename jni_non_null_call (which may return nulls) to jni_non_void_call.

    A lot of public methods of JNIEnv have been marked as safe, all unsafe code
    🛠 has been isolated inside internal macros. Methods with _unsafe suffixes have
    🛠 been renamed and now have _unchecked suffixes (#140)

    from_str method of the JavaType has been replaced by the FromStr

    🔀 Implemented Sync for GlobalRef (#102).

    👌 Improvements in macro usage for JNI methods calls (#136):

    • call_static_method_unchecked and get_static_field_unchecked methods are
      👍 allowed to return NULL object
    • Added checking for pending exception to the call_static_method_unchecked
      ⚠ method (eliminated WARNING messages in log)

    Further improvements in macro usage for JNI method calls (#150):

    • The new_global_ref() and new_local_ref() functions are allowed to work with NULL objects according to specification.
    • Fixed the family of functions new_direct_byte_buffer(), get_direct_buffer_address() and get_direct_buffer_capacity()
      by adding checking for null and error codes.

    - Increased tests coverage for JNIEnv functions.

    👯 Implemented Clone for JNIEnv (#147).

    The get_superclass(), get_field_unchecked() and get_object_array_element() are allowed to return NULL object according
    to the specification (#163).

    🛠 Fixed

    • The issue with early detaching of a thread by nested AttachGuard. (#139)