Thanks for the comment.  You are right, it is a bug.  Should be "mh = 
mh.asType...".

Best wishes,
-- John

On Sep 14, 2010, at 9:20 PM, Ali Ebrahimi wrote:

> Hi John,
> 
> In method linkMethodHandleConstant in sun/dyn/MethodHandleNatives.java
> 
> 
>     static Object linkMethodHandleConstant(Class<?> callerClass, Object fun, 
> Object arg) {
>         try {
>             MethodHandle mh = ((MethodHandleProvider) fun).asMethodHandle();
>             if (mh.type().parameterCount() > 1)
>                 return mh.bindTo(arg);
>             mh.asType(MethodType.genericMethodType(1)); 
> <======================== this line is OK?
>             return mh.invokeExact(arg);
>         } catch (Throwable ex) {
>             Error err = new IncompatibleClassChangeError();
>             err.initCause(ex);
>             throw err;
>         }
>     }
> }
> 
> this line does not return new object?
> 
> Best Regards,
> Ali Ebrahimi
> 
> _______________________________________________
> mlvm-dev mailing list
> [email protected]
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to