You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The registration of the method does actually work. It doesn't throw a UnsatisfiedLinkException. The Methods c-peer is found in Native.register(Class<?> cls, NativeLibrary lib) and also put on the registeredClasses map - even though the prototype is incorrect.
Finally, when calling the native method in Java, a NullPointerException is thrown.
Issue
When using direct mapping the register method should throw an UnsatisfiedLinkException, if the native function doesn't match the prototype of the declared function.
The text was updated successfully, but these errors were encountered:
For direct mapped methods the java value is directly passed to the C
side. For wrappers this means, that the object pointer is passed and
not the primitive values.
This changeset removes the mappings for the Wrapper classes and makes
it possible to use a type converter to make the call possible, at the
cost of higher calling costs.
Closes: java-native-access#918
JNA-Version: 4.5.1
JVM: Oracle 1.8.0_111
Operating System: macOS High Sierra 10.13.3
I have a simple C-Function, that is mapped to Java using direct mapping. The C-Function is defined as:
The working (direct) mapping of this function would be:
But it is also possible to declare the native function in Java with
Double
:The registration of the method does actually work. It doesn't throw a
UnsatisfiedLinkException
. The Methods c-peer is found inNative.register(Class<?> cls, NativeLibrary lib)
and also put on the registeredClasses map - even though the prototype is incorrect.Finally, when calling the native method in Java, a NullPointerException is thrown.
Issue
When using direct mapping the register method should throw an
UnsatisfiedLinkException
, if the native function doesn't match the prototype of the declared function.The text was updated successfully, but these errors were encountered: