Heads-up -- incompatible changes coming
Robert Field
robert.field at oracle.com
Fri Jul 12 11:32:48 PDT 2013
On 07/12/13 02:52, Maurizio Cimadamore wrote:
> On 12/07/13 02:01, Nick Williams wrote:
>> On Jul 11, 2013, at 7:16 PM, Brian Goetz wrote:
>>
>>>> 1) Do these changes only make those classes compiled with -target=1.8 incompatible, or do they make even those classes compiled -target=1.6 with the JDK8 compiler incompatible?
>>>> 2) Do these changes only make those classes containing lambdas and/or method references incompatible, or do they also make even classes without lambdas/references incompatible?
>>> Only those compiled with -target=1.8 and which use Java 8 language features (lambdas or default methods). The latter rules out any other target.
>> That's along the lines that I was thinking. Thanks!
>>
>> Nick
>>
>>
> I would say that even classes w/o JDK 8 features (but compiled with
> -target 8) will be affected as compiler will start adding bridges to
> interfaces.
The change is in the interface used for lambda metafactories. Interface
bridges use default methods, which, as before, require an 8 VM, but they
don't use lambdas. This shouldn't have an impact there.
That said, the best strategy, and the one we should be promoting is
recompile everything.
-Robert
>
> Maurizio
>
More information about the lambda-dev
mailing list