Javadoc (b116) lacks @FunctionalInterface on Observer signature
Paul Benedict
pbenedict at apache.org
Fri Nov 22 07:52:55 PST 2013
Joe, what do you think rewording the description to saying: "This an
implicit functional interface" (adding the word implicit)? I think we must
differentiate between the two; I would find this clarification in the docs
much more meaningful in light of your explanation.
On Thu, Nov 21, 2013 at 9:50 PM, Paul Benedict <pbenedict at apache.org> wrote:
> Alright, I suppose. Very surprising to see such a distinction being made
> in these reports; I think the output is not intuitive, but at least I can
> explain it to someone else now.
>
>
> On Thu, Nov 21, 2013 at 9:43 PM, Joe Darcy <joe.darcy at oracle.com> wrote:
>
>> On 11/21/2013 07:40 PM, Paul Benedict wrote:
>>
>>> Look at, Closeable, as an example. You removed the @FunctionalInterface
>>> annotation but the javadocs still report it as a functional interface in
>>> the class description.
>>>
>>> http://download.java.net/jdk8/docs/api/java/io/Closeable.html
>>>
>>
>> Yes, that is the correct and expected outcome.
>>
>> The type java.io.Closeable meets the JLS definition of a functional
>> interface and gets reported accordingly by javac. However, it is not
>> morally a functional interface so it no longer has the @FunctionalInterface
>> annotation, an annotation which indicates intentions towards usage and
>> interface evolution.
>>
>> -Joe
>>
>
>
>
> --
> Cheers,
> Paul
>
--
Cheers,
Paul
More information about the lambda-dev
mailing list