Question about MethodHandles#explicitCastArgument
Jochen Theodorou
blackdrag at gmx.org
Thu Nov 15 23:32:31 PST 2012
Am 16.11.2012 00:32, schrieb John Rose:
[...]
> What you are seeing is a bug. I can reproduce this in JDK 7 but not in
> JDK 8. The upcoming JDK 7 update will fix this, since it is a backport
> from 8.
ah, finally the backport of jdk8 ;) I hope it does not break other
things;) Btw, I noticed this not only with Byte, but with almost any
wrapper type... of course Float did work.
There is one part of he documentation that makes me a bit wonder
though... If I want to convert a Long argument to an int argument it
will not work? I mean it is not according to the Java widening rules
afaik. And the documentation is telling about that. But since there are
bytecode instructions for this - why the limitation? For me it means a
lot of more work, since I not only have to check if they are primitives,
I also have to check the widening conversions of Java are followed and
if not apply my own transformations. And checking the widening rules...
that is I think 19 cases.
bye Jochen
--
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org
More information about the mlvm-dev
mailing list