[armedbear-devel] TYPE-ERROR #<java.lang.String foo {BADEAFFE}> cannot be coerced to a string.

Alessio Stalla alessiostalla at gmail.com
Mon Jun 14 18:18:19 UTC 2010

On Sat, Jun 12, 2010 at 3:40 PM, Mario Lang <mlang at delysid.org> wrote:
> Hi.
> Just stumbled across this one when I tried to use STRING-EQUAL
> to compare a value I received via JINTERFACE-IMPLEMENTATION.
> Now, it appears to be very simple to allow the expression
>  (string (jnew "java.lang.String" "foo"))
> by overriding STRING() in JavaObject and checking if obj is a (java) String.
> What do you think?

I think it would be a valuable addition, but why limit it to Strings?
(string java-object) could always return the result of calling
toString() on the wrapped object, or "null" when it's null.


More information about the armedbear-devel mailing list