JDK 8 code review request for 8005298 Add FunctionalInterface type to the core libraries

Stephen Colebourne scolebourne at joda.org
Wed Jan 9 10:55:10 UTC 2013


You have <p> before each paragraph except the second.

(Personally, I put the <p> between the paragraphs, as it makes things
like this simpler to read. I would also avoid the trailing "If" and
lone "Specification" by adjusting the line spacing. See
http://blog.joda.org/2012/11/javadoc-coding-standards.html)

Stephen


On 8 January 2013 22:43, Joe Darcy <joe.darcy at oracle.com> wrote:
> PS The updated webrev is
>
>     http://cr.openjdk.java.net/~darcy/8005298.1/
>
> Thanks,
>
> -Joe
>
>
> On 01/08/2013 02:00 PM, Joe Darcy wrote:
>>
>> Hi Mike,
>>
>> On 01/08/2013 01:49 PM, Mike Duigou wrote:
>>>
>>> Perhaps {@code} around java.lang.Object.
>>
>>
>> Agreed.
>>
>>>
>>> The default method and overriding Object method sentences could perhaps
>>> be said more simply:
>>>
>>> {@linkplain  java.lang.reflect.Method#isDefault() default methods} in
>>> interfaces do provide a method implementation and are not considered
>>> abstract.
>>>
>>> Interface methods which match methods of java.lang.Object are not
>>> considered abstract because an implementation (from java.lang.Object) is
>>> always available.
>>>
>>> Mostly it's enough to say that they aren't abstract. The part about
>>> abstract method count is superfluous.
>>
>>
>> Okay; rewritten as:
>>
>>  * Conceptually, a functional interface has exactly one abstract
>>  * method.  Since {@linkplain java.lang.reflect.Method#isDefault()
>>  * default methods} have an implementation, they are not abstract. If
>>  * an interface declares an abstract method overriding one of the
>>  * public methods of {@code java.lang.Object}, that also does
>>  * <em>not</em> count toward the interface's abstract method count
>>  * since any implementation of the interface will have an
>>  * implementation from {@code java.lang.Object} or elsewhere.
>>
>>>
>>> @jls ref for default methods.
>>
>>
>> That is actually included in the draft text of 9.4.3 and so is covered by
>>
>>  * @jls 9.4.3 Interface Method Body
>>>
>>>
>>> @jls ref for methods of Object.
>>
>>
>> That is a good addition; I'll include
>>
>>  * @jls 4.3.2. The Class Object
>>
>> Thanks,
>>
>> -Joe
>>
>>>
>>> On Jan 8 2013, at 13:24 , Joe Darcy wrote:
>>>
>>>> Hello,
>>>>
>>>> As discussed over on one of the Project Lambda lists [1], we're adding
>>>> an interface type to the platform to explicitly mark interface types as
>>>> being functional interfaces suitable for use in lambda expressions.  Please
>>>> review the addition of this new type:
>>>>
>>>>     http://cr.openjdk.java.net/~darcy/8005298.0/
>>>>
>>>> Follow-up work will add @FunctionalInterface annotations to appropriate
>>>> platform classes.
>>>>
>>>> Thanks,
>>>>
>>>> -Joe
>>>>
>>>> [1]
>>>> http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/2012-December/000846.html
>>
>>
>



More information about the core-libs-dev mailing list