[Armedbear-cvs] r14687 - in trunk/abcl: src/org/armedbear/lisp test/lisp/abcl
mevenson at common-lisp.net
mevenson at common-lisp.net
Fri Apr 18 06:03:28 UTC 2014
Author: mevenson
Date: Fri Apr 18 06:03:27 2014
New Revision: 14687
Log:
Fix loading of JNA with recent JCALL improvements.
>From Olof.
Modified:
trunk/abcl/src/org/armedbear/lisp/Java.java
trunk/abcl/test/lisp/abcl/java-tests.lisp
Modified: trunk/abcl/src/org/armedbear/lisp/Java.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Java.java Thu Apr 17 12:13:56 2014 (r14686)
+++ trunk/abcl/src/org/armedbear/lisp/Java.java Fri Apr 18 06:03:27 2014 (r14687)
@@ -1065,7 +1065,9 @@
for (int i = 0; i < methodTypes.length; ++i) {
Class<?> methodType = methodTypes[i];
Object arg = args[i];
- if (!isAssignable(arg.getClass(), methodType)) {
+ if (arg == null) {
+ return !methodType.isPrimitive();
+ } else if (!isAssignable(arg.getClass(), methodType)) {
return false;
}
}
Modified: trunk/abcl/test/lisp/abcl/java-tests.lisp
==============================================================================
--- trunk/abcl/test/lisp/abcl/java-tests.lisp Thu Apr 17 12:13:56 2014 (r14686)
+++ trunk/abcl/test/lisp/abcl/java-tests.lisp Fri Apr 18 06:03:27 2014 (r14687)
@@ -203,6 +203,11 @@
(jcall "offsetByCodePoints" "foobar" 0 #\Nul)
0)
+(deftest jcall.7
+ (signals-error (jcall "offsetByCodePoints" "foobar" 0 nil)
+ #+abcl 'java-exception
+ #+allegro 'jlinker-error))
+
(deftest jfield.1
(type-of (jfield "java.lang.Integer" "TYPE"))
#+abcl java-object
More information about the armedbear-cvs
mailing list