Defender methods and compatibility

Neal Gafter neal at gafter.com
Wed Nov 24 17:22:41 PST 2010


On Wed, Nov 24, 2010 at 3:48 PM, Alex Buckley <alex.buckley at oracle.com>wrote:

> On 11/24/2010 3:29 PM, Alex Buckley wrote:
>
>> Anyway, the good news is that mod-extn _is_ SC. That's true whether a
>> default is specified in the interface via a method body or a method name.
>>
>
> Should have said: mod-extn _may be_ SC. When an implementation class
> doesn't override the extension, it's possible for previously-identical
> extension methods to diverge (i.e. one changes its default) and break SC.
>

Understood.  That is the particular part of the specification that I take
issue with.  mod-extn (changing the code of a default method) should (in my
opinion) always be source compatible, as the code of a method is a prime
example of an implementation detail.


More information about the lambda-dev mailing list