Re: coerce a number to a short
Mark Evenson <[email protected]> Wed, 27 Nov 2019 00:53:05 +0100
| Newsgroups | gmane.editors.j.devel |
|---|---|
| Message-ID | <CCB1E64C-02BD-4CC3-9138-C4161F658647__49710.1240254537$1574812417$gmane$org@panix.com> |
> On Nov 26, 2019, at 18:38, Brad Knotwell <[email protected]> wrote: > > I've been using ABCL to get access to a Java library and it's worked generally well. I have run into one problem I haven't been able to workaround. > > I need to make a call to a method that takes a short as an argument. I'm passing in a value--10--that fits in a short but ABCL can't find the method (presumedly due to a type issue). I've tried using jcoerce but it's not doing what I expect. What's the right way to do this? This is probably a bug in how the Bear’s FFI converts the “10” when it attempts to locate your specific Java call site, but without a test the contains the Java code that you are calling into diagnosing exactly what is going in is difficult. When I get the time (or unless someone beats me to it), I will try to make such a test to figure out what is going on. We could certainly do with a test suite that combinatorally probes our call site location logic. -- "A screaming comes across the sky. It has happened before but there is nothing to compare to it now."