MethodHandle.invoke* should only work with source 1.7
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Thu Feb 10 03:33:39 PST 2011
On 10/02/11 10:20, Rémi Forax wrote:
> I've noticed that javac allows to use MethodHandle.invokeExact() or
> MethodHandle.invokeGeneric if the source version is 1.6
>
> It's not a good idea because you can't use a real 1.6 javac to compile
> these methods.
>
> Rémi
>
>
>
Well, yes and no. Javac allows such calls with -source 6 but won't apply
any of the 292 magic - that is, the behavior you will get will be the
same as if you compile the code with a real javac compiler -
@PolymorphicSignature will be ignored and no extra bytecode info will be
generated.
Maurizio
More information about the mlvm-dev
mailing list