Re: Question about MethodHandles#explicitCastArgument

2012-11-15 Thread John Rose
[Repost, moving from jvm-l list.] On Nov 14, 2012, at 6:16 AM, Jochen Theodorou wrote: I have a call to MethodHandles#explicitCastArgument with first argument being my MethodHandle(Groovy3135Bug,String,float,float,float,float,float)Object and the type I cast to being

Re: Question about MethodHandles#explicitCastArgument

2012-11-15 Thread John Rose
On Nov 15, 2012, at 3:32 PM, John Rose wrote: It can be right, but only if the actual argument is a null reference. If it is a non-null Byte, it must unbox to a byte and then widen to a float. Well, actually, in this case, the NPE should not happen either. Nulls are explicitly cast (though

Re: Question about MethodHandles#explicitCastArgument

2012-11-15 Thread Jochen Theodorou
Hi John, Am 16.11.2012 04:09, schrieb John Rose: On Nov 15, 2012, at 3:32 PM, John Rose wrote: It can be right, but only if the actual argument is a null reference. If it is a non-null Byte, it must unbox to a byte and then widen to a float. Well, actually, in this case, the NPE should

Re: Question about MethodHandles#explicitCastArgument

2012-11-15 Thread Jochen Theodorou
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