JavaCpp v1.5.4 Release Notes

Release Date: 2020-09-09 // 10 days ago
    • Fix Parser not producing PointerPointer parameters for FunctionPointer subclasses
    • Let Builder copy even those platform.executable files without prefix or suffix
    • Add missing declaration for GetCurrentThreadId() in Generator when NO_WINDOWS_H is defined
    • Process #undef directives to allow redefining macros with Parser (issue bytedeco/javacpp-presets#935)
    • Pick up in Parser methods specified with override, in addition to virtual (issue #419)
    • Let Parser create a separate Java peer class when Info.pointerTypes is different for types prefixed with const
    • Fix Generator for @Virtual methods protected in subclasses by casting to superclass (issue #419)
    • Add missing values to Info.Info(Info) and fix incorrect Info.skipDefaults(boolean) (issue #420)
    • Add PointerBufferPoolMXBean to track allocations and deallocations of Pointer (pull #413)
    • Change the @Platform(executable=... property to an array and allow bundling multiple files per class
    • Prevent Builder unnecessarily linking with -framework JavaVM to fix GraalVM Native Image on Mac (issue #417)
    • Add Pointer.getPointer() methods as shortcuts for new P(p).position(p.position + i) (issue #155)
    • Fix Generator for cases when a FunctionPointer returns another FunctionPointer
    • Fix Parser failure with auto keyword of C++11 used as placeholder type specifier or for trailing return type (issue #407)
    • Add Builder.configDirectory option to let Generator output files that GraalVM needs for AOT compilation (issue eclipse/deeplearning4j#7362)
    • Fix Parser error on template<> containing non-type parameters without names (issue bytedeco/javacpp-presets#889)
    • Bundle also the vcruntime140_1.dll and msvcp140_1.dll redist files from Visual Studio
    • Fix Builder for different "java.home" path returned by latest JDKs from Oracle (pull #400)
    • Refactor Builder a little to work around issues with Gradle
    • Log as warnings SecurityException thrown on Loader.getCacheDir() instead of swallowing them
    • Fix memory leak that occurs with "org.bytedeco.javacpp.nopointergc" (issue bytedeco/javacpp-presets#878)
    • Take into account platform.library.path when extracting executables and their libraries on Loader.load() (issue bytedeco/javacv#1410)
    • Move init code for Loader.getPlatform() to Detector to avoid warning messages (issue #393)
    • Add HyperslabIndex class with offsets, strides, counts, and blocks parameters (pull #392)
    • Add Index class to allow overriding how the index is calculated in Indexer (issue #391)

Previous changes from v1.5.3

    • Deprecate but also fix Indexer.rows(), cols(), width(), height(), and channels() (pull #390)
    • Fix Parser producing invalid wrappers for basic containers like std::set<std::pair<...> >
    • Add compiler options for C++98, C++03, C++14, and C++17 to platform properties files (pull #389)
    • Remove default compiler options from linux-armhf.properties that work mostly only for Raspberry Pi
    • Add Generator support for enum classes with boolean values (issue #388)
    • Fix Parser outputting invalid Java code for enum of boolean, byte, and short types (issue #388)
    • Pick up in Generator the @Namespace annotation from paired method too for global getters and setters (issue #387)
    • Add presets for jnijavacpp and javacpp-platform artifact to fix issues at load time (issue bytedeco/javacv#1305)
    • Prevent potential NullPointerException in Loader.checkVersion() (pull #385)
    • Allow using Charset to avoid UnsupportedEncodingException from BytePointer (pull #384)
    • Add static Pointer.isNull(Pointer p) helper method, for convenience
    • Add MoveAdapter and corresponding @StdMove annotation to support objects that require std::move from C++11
    • Always use File.pathSeparator when passing multiple paths via the BUILD_PATH environment variable
    • Fix Parser not picking up Info for declarations with decltype() specifier
    • Fix Pointer losing its owner when mistakenly ignoring deallocators for const values returned from adapters
    • Remove unnecessary declared Exception from Indexer.close() signature (pull #382)
    • Make sure Parser recognizes base classes of struct as public by default
    • Fix Parser error on initializer lists containing C++11 style { ... } for template instances
    • Change the default mapping of jboolean to BooleanPointer instead of BoolPointer
    • Fix Parser error on function declarations with ... varargs as single parameter
    • Make Parser skip over &&-qualified functions automatically since they cannot be supported
    • Fix Parser annotating pointer cast operator methods with incorrect @Cast (issue #379)
    • Allow Parser to inherit constructors from template classes with using
    • Make Parser honor Info.skip for anonymous struct or union as well
    • Optimize Pointer.sizeof() method of subclasses for primitive types
    • Let users override Info.enumerate on a per-enum basis and allow attributes after enum class
    • Fix Parser not considering identifiers as type names when placed directly after friend or in template<>
    • Check for defined NO_WINDOWS_H macro in Generator to skip #include <windows.h>
    • Provide UIntIndexer and ULongIndexer, treating array and buffer data as unsigned 32- or 64-bit integers, for convenience (issue #376)
    • Fix Parser not evaluating using namespace with respect to the current block (issue #370)
    • Fix exception in Loader when running jlink image with JDK 13+ (pull #375)
    • Fix errors with @Virtual @Name("operator ...") in Generator by using Java names for C++ (issue #362)
    • Apply in Parser missing const to parameters of @Virtual functions using adapters
    • Use in Generator C++11 override keyword for @Virtual functions (pull #373)
    • Speed up Loader.load() by caching results returned from Loader.findLibrary() (issue #287)
    • Pick up Info correctly in Parser also for anonymous function pointers with const parameters
    • Make Parser apply Info.translate in the case of enumerators as well
    • Fix compiler failures in Builder with platform properties containing relative paths
    • Let Parser rename types using Info.javaNames in addition to valueTypes and pointerTypes (pull #367)
    • Include in the defaults of InfoMap mappings missing for the std::array and jchar types
    • Fix various Parser failures with attributes on constructors, empty macros, enum classes, friend classes, inherited constructors, and keywords in parameter names
    • Add to Parser support for C++11 attributes found within [[ and ]] brackets
    • Consider Pointer values maxBytes or maxPhysicalBytes suffixed with % as relative to Runtime.maxMemory() (pull #365)
    • Prevent Parser from considering constexpr operator declarations as const types
    • Fix on Loader.load() the default library name of classes without @Properties(target=..., global=...)
    • Prevent Parser from outputting asPointer() cast methods with multiple inheritance (issue #360)
    • Add CacheMojo to help extract binaries and resources used by command line tools outside of the JVM
    • Fix Android build properties for NDK r20b (pull #357)