JavaCPP v1.2 Release Notes

Release Date: 2016-05-15 // almost 8 years ago
    • Fix NullPointerException in Builder on invalid java.home system property or inaccessible directories
    • Add parameters to Loader.load() offering more flexibility over the platform properties and library paths
    • Treat all String with Charset.defaultCharset() (or define MODIFIED_UTF8_STRING for old behavior) (issue #70)
    • Fix NullPointerException in Parser on variadic templates (issue #81)
    • Fix Loader.load() error when called right after Builder.build() within the same process
    • Lower Maven prerequisite in the pom.xml file to 3.0 (issue #93)
    • Use Info.cppTypes for all Parser type substitutions, in addition to macros and templates (issue bytedeco/javacpp-presets#192)
    • Make Parser take into account Java keywords not reserved in C++, casting issues with int64_t, and const value types in basic containers
    • Let users define NATIVE_ALLOCATOR and NATIVE_DEALLOCATOR macros to overload global new and delete operators
    • Map jint to int and jlong to long long on Windows as well as all platforms with GCC (or Clang)
    • Fix corner cases when checking for the platform in Generator and Parser
    • Link libraries with "-z noexecstack" on Linux as recommended by HotSpot (pull #90)
    • Set the internal DT_SONAME field in libraries created for Android (issue bytedeco/javacpp-presets#188)
    • Add "org.bytedeco.javacpp.maxbytes" system property, forcing a call to System.gc() when this amount of memory tracked with deallocators is reached
    • Let Parser pick up Info.annotations in the case of function pointers as well
    • Add @Convention(extern=...) value to have Generator produce FunctionPointer with other language linkage than "C"
    • Enhance the indexer package with long indexing, initially via the sun.misc.Unsafe, for now
    • Lengthen the position, limit, and capacity fields of Pointer using long
    • Prevent creating text relocations for shared libraries on Android, which are rejected by recent versions of the SDK
    • Use the outputDirectory as the compiler's working directory (pull #89)
    • Comment with first dimension of multidimensional array inside @Cast (pull #87)
    • Remove throws Exception from Pointer.close() since destructors do not typically throw exceptions (pull #86)
    • Add -nodelete flag to keep generated C++ files after compilation (pull #85)
    • Annotate functions originating from cinclude with @NoException (pull #84)
    • Call JNI_ABORT on release of const arrays (pull #83)
    • Add support for C++11 default and delete on function declarations (issue #80)
    • Add support for C++11 typed enum, with or without enumerator list (issue #78)
    • Add missing space for const types when normalizing template arguments in Parser (issue bytedeco/javacpp-presets#165)
    • Make Builder fail on ClassNotFoundException or NoClassDefFoundError instead of logging warnings
    • Allow Builder to generate native libraries with empty @Platform annotation even without user defined native methods
    • Enhance Parser to support a bit better && tokens and C++11 rvalue references (issue bytedeco/javacpp-presets#160)
    • Add properties for the linux-armhf, linux-ppc64, and linux-ppc64le platforms, and pick up macosx when os.name is darwin
    • Fix NullPointerException in Parser on unexpected forms of function pointers (issue #70)
    • Make sure Generator produces calls to sizeof() and offsetof() for all Pointer classes with allocators
    • Let Parser use adapters in the case of FunctionPointer as well (issue bytedeco/javacpp-presets#145)
    • Prepend "javacpp." to all properties associated with Maven in BuildMojo to avoid name clashes
    • Let users define the GENERIC_EXCEPTION_CLASS macro (default of std::exception) to indicate the base exception thrown by native methods
    • Split type names at :: delimiters before mapping them against templates in Parser
    • Fix swallowed InterruptedException (issue bytedeco/javacv#315)
    • Adjust a few things in Generator preventing @Virtual from working properly in some cases (issue bytedeco/javacpp-presets#143)
    • Fix TokenIndexer inserting an invalid token while expanding macros ending with a backslash (issue #63)
    • Make Parser take Info.skip into account for enum declarations as well
    • Improve the performance of BytePointer.getString() by using strlen()
    • Prevent Generator from initializing classes when preloading them, which can cause problems (issue bytedeco/javacpp-presets#126)
    • Add Info.flatten to duplicate class declarations into their subclasses, useful when a subclass pointer cannot be used for the base class as well
    • Prevent Loader from extracting libraries more than once, which can cause problems (issue bytedeco/javacpp-presets#126)
    • Make Indexer implements AutoCloseable to let us try-with-resources
    • Add missing calls to close() for InputStream and OutputStream in Loader (issue #53)
    • Remove Piper class no longer needed with Java SE 7
    • Let Parser place appropriate Info.javaText() provided by users in the case of destructors as well
    • Fix the Parser skipping over some declarations by mistake and producing invalid comments for macros
    • To let users specify ... varargs as Info.pointerTypes(), have the Parser replace them with array [] when not found on the last parameter
    • Enhance basic support for containers of the style std::vector<std::pair< ... > > with user-friendly array-based setter methods
    • Fix Generator not passing function objects even when annotating FunctionPointer parameters with @ByVal or @ByRef
    • Map bool* to boolean[] tentatively in Parser since sizeof(bool) == sizeof(jboolean) on most platforms
    • Allow Parser to generate @Cast() annotations and overloaded put() methods in basic containers too
    • Move list of basic containers and types to Info.cppTypes of the "basic/containers" and "basic/types" InfoMap entries, letting users change them at build time
    • Fix some Parser issues with typedef and forward declarations inside class definitions
    • Insure Parser maps 64-bit values in C++ enum to long variables (issue #48)
    • Fix Generator trying to cast improperly objects on return from @Virtual functions
    • Make Parser take constexpr, nullptr, and namespace aliases into account, and fix a couple of preprocessing issues with TokenIndexer
    • Fix primitive arrays and NIO buffers not getting updated on return when used as arguments with adapters (issue bytedeco/javacpp-presets#109)
    • Enhance a bit the conversion from Doxygen-style documentation comments to Javadoc-style
    • Remove class check in allocators, which prevented peer classes from being extended in Java, instead relying on super((Pointer)null) in child peer classes, and remove confusing and now unnecessary empty constructors