[armedbear-devel] Losing type information after storing in java.util.ArrayList
Mark Evenson
evenson at panix.com
Wed Mar 24 07:56:38 UTC 2010
On 3/23/10 5:58 PM, David Kirkman wrote:
[…]
>> Comments and advice solicited.
>>
>
> intendedType ends up as java.lang.Object for any java object I move into and
> out of an ArrayList -- not just arrays. As far as I can tell, lisp
> objects move back
> and forth with no trouble, (inspect ..) does not show any difference
> for a hash table
> I move back and forth, but (inspect ..) does show that a java.io.File moved back
> and forth ends up with a changed intendedType.
>
> I'm doing a lot of this sort of thing, and the example with
> sys::%make-byte-array-output-string is the only thing that gave me trouble.
> Even when a java.io.File ends up with Object as it's intendedType, it
> still works
> fine with (jcall ...). I assume that there would only be trouble when
> JavaObject.javaInstance() is called, which is apparently not that often!
This partially answers my concerns about testing, as your use certainly
sounds like it is validating the change and the current structure. The
other part of my concerns would be addressed by more extensive tests for
the Java FFI in our unit tests, which I will place on my TODO list.
--
"A screaming comes across the sky. It has happened before, but there
is nothing to compare to it now."
More information about the armedbear-devel
mailing list