The implementation of default methods

Brian Goetz brian.goetz at oracle.com
Fri Dec 14 08:59:10 PST 2012


Short answer: yes.

Longer answer: the challenge is that these wordings differ from each 
other in subtle ways, which means either we must be very precise about 
exactly where these statements are, and their exact wording, or we need 
some more structure to the Javadoc so there's an obviously right place 
to put the words that make it clear what category you are in.

On 12/14/2012 11:45 AM, Doug Lea wrote:
> On 12/14/12 11:30, Brian Goetz wrote:
>
>> 1.  Document "Implementation note: The default implementation
>> currently..."
>
> As always, the fewer of these the better. In j.u/j.u.c, these
> are used mostly for resource limitations (like max threads in FJP)
> that might someday be lifted.
>
>>
>> 2.  Document "The default implementation behaves as if..."  (Or
>> whatever Doug's
>> proposed wording is.)
>
> In j.u.c, we always say "is behaviorally equivalent to" but I dropped
> the "behaviorally" in Map candidate because someone once told me
> it was overly pedantic :-)
>
>>
>> 3.  Document "The default implementation MUST"
>
> Isn't this just the normal spec part, that should precede the default
> implementation part?
>
> -Doug
>


More information about the lambda-libs-spec-observers mailing list