[armedbear-devel] Bug in abcl/contrib/jss/invoke.lisp - trying to call JScheme's jsint.Invoke.poke, jsint.Invoke.pokeStatic
Jonathan P. Bona
jonathanbona at gmail.com
Thu Apr 5 20:52:20 UTC 2012
An issue in invoke.lisp (below): set-java-field calls the poke and
pokeStatic methods from jscheme's jsint.Invoke class. This should be
replaced, right?
;;; http://svn.common-lisp.net/armedbear/tags/1.0.1/abcl/contrib/jss/invoke.lisp
(defun set-java-field (object field value &optional (try-harder
*running-in-osgi*))
(if try-harder
(let* ((class (if (symbolp object)
(setq object (find-java-class object))
(if (equal "java.lang.Class" (jclass-name (jobject-class object)) )
object
(jobject-class object))))
(jfield (if (java-object-p field)
field
(find field (#"getDeclaredFields" class) :key 'jfield-name
:test 'equal))))
(#"setAccessible" jfield t)
(values (#"set" jfield object value) jfield))
(if (symbolp object)
(let ((class (find-java-class object)))
(#"pokeStatic" 'invoke class field value))
(#"poke" 'invoke object field value))))
- Jonathan Bona
More information about the armedbear-devel
mailing list