JavaCPP v1.5.6 Release Notes

Release Date: 2021-08-02 // 3 months ago
    • Add missing export to module-info.java file for presets package (pull #508)
    • Add @NoException(true) value to support overriding virtual noexcept functions
    • Bundle more DLLs from UCRT to fix the systems presets on Windows
    • Fix Pointer.sizeof() method for subclasses of subclasses for primitive types (issue bytedeco/javacpp-presets#1064)
    • Throw more accurate UnsatisfiedLinkError when Loader.load() fails to find JNI libraries
    • Let Parser check Info.skipDefaults also for types to ignore default constructors (issue #493)
    • Fix Parser failure on enum declarations without enumerators
    • Let Generator use the third element of @Cast(value) on return values passed to adapters (issue tensorflow/java#345)
    • Prevent Generator from swallowing exceptions caught on Buffer.array() (pull #504)
    • Add enum classes as well as resources missing from config files required by GraalVM Native Image
    • Let Parser annotate && parameters with new @ByRef(true) value used by Generator to call std::move()
    • Fix Parser overlooking anonymous class, struct or union with comments after } (issue #501)
    • Add Info.beanify to have Parser generate JavaBeans-style getters and setters (pull #495)
    • Allow Parser to use Info.javaNames for function names containing parameters as well (issue #492)
    • Fix Parser producing incorrect calls to function templates with non-type parameters (issue #491)
    • Add missing presets/package-info.java required for OSGi and add profile for M2Eclipse (pull #490)
    • Remove unnecessary mutex lock for pthreads on callbacks in Generator (pull #489)
    • Fix @AsUtf16 handling for setter methods paired with getters in Generator (pull #488)
    • Allow defining NO_JNI_DETACH_THREAD to avoid overhead from pthreads on callbacks (issue #486)
    • Pick up @Allocator, @CriticalRegion, @NoException in Generator from @Properties(inherit=classes) as well (issue #484)
    • Add support for Deleter of pointer types to UniquePtrAdapter
    • Add @Platform(pattern=...) annotation value to allow matching with regular expressions as well
    • Allow Parser to consider function pointers declared with using but without indirections
    • Let Parser map to annotations whole expressions starting with the __attribute__ keyword
    • Fix Parser sometimes failing to create template instances with default arguments (issue #478)
    • Enhance Parser to handle typedef correctly in the case of enum as well (issue #477)
    • Upon Pointer.getPointer(Class<P>) scale position, limit, and capacity with sizeof() (pull #476)
    • Fix Parser incorrectly translating non-documentation comments as part of documentation comments (issue #475)
    • Set Pointer.maxPhysicalBytes to 4 * Runtime.maxMemory() by default as workaround for Android, memory-mapped files, ZGC, etc (issue #468)
    • Ensure synchronized code in Pointer gets skipped with "org.bytedeco.javacpp.nopointergc" (issue tensorflow/java#313)
    • Add protected Pointer.offsetAddress() and use it for getPointer() instead of position()
    • Fix potential infinite loop in Parser when processing class, struct, or union declarations
    • Have Parser wrap the erase() methods of basic containers with iterators to allow removing from maps
    • Let Parser output the content of Info.javaText in the case of basic containers as well
    • Fix Parser failure on arguments containing multiple array accesses ending with ]]
    • Fix Parser incorrectly considering some array definitions with expressions as multidimensional
    • Log loading errors of optional jnijavacpp as debug messages instead of warnings (issue tensorflow/java#189)
    • Fix memory leak in Pointer.releaseReference() with "org.bytedeco.javacpp.nopointergc" (issue awslabs/djl#690)
    • Fix Parser not stripping annotations from Info.pointerTypes when creating Java peer classes
    • Fix Parser not inheriting constructors with existing Info or with nested templates
    • Add support for std::tuple, std::optional, and std::variant basic containers and fix various Parser failures
    • Add parameter for Loader.load() to return path of a specific executable (pull #466)
    • Use std::uninitialized_copy in VectorAdapter to make sure copy constructors get called (pull #465)

Previous changes from v1.5.5

    • Ensure System.gc() never gets called with "org.bytedeco.javacpp.nopointergc" (issue tensorflow/java#208)
    • Add Info.immutable to disable generating setters for public data members (pull #461)
    • Map String to char* with Charset.forName(STRING_BYTES_CHARSET) when that macro is defined (pull #460)
    • Fix Loader.ClassProperties not always getting overridden correctly when defined multiple times
    • Allow Loader.load() to also rename executables on extraction to output filenames specified with the # character
    • Add @AsUtf16 annotation to map java.lang.String to unsigned short* (array of UTF-16 code units) (pull #442)
    • Add BasicStringAdapter and corresponding @StdBasicString, @StdU16String, and @StdU32String annotations (pull #448)
    • Fix Parser failures on try blocks as function body, nested class templates, and aliases to namespaces starting with ::
    • Prevent Loader from failing to find, load, or link libraries multiple times
    • Fix Pointer.getPointer() methods sometimes calling the wrong constructor (issue bytedeco/javacv#1556)
    • Prevent Android from trying to load PointerBufferPoolMXBean by using it via reflection (pull #447)
    • Fix Android build properties for NDK r22 and move legacy to android-*-gcc.properties (pull #444)
    • Add support for Mac on ARM processors
    • Fix Loader not searching for libraries in more than one package
    • Prevent Builder from linking with -framework JavaVM when a path to the JVM library is found
    • Replace requires with requires static in JPMS .platform module (pull #436)
    • Let Parser output Info.javaText even for template declarations with no instances
    • Prevent Tokenizer from using long literals for unsigned integers of 16 bits or less
    • Ensure Parser considers >= and <= as single tokens to prevent failures
    • Make Parser use Info.cppTypes to override the type of enum values
    • Fix Parser not using the correct Info.pointerTypes for const& declarations
    • Use pthreads in Generator to detach automatically native threads on exit for Linux and Mac as well
    • Let Loader.load() always succeed on optional libraries only available with extensions
    • Fix Builder.addProperty() incorrectly appending values together