Javadoc (b116) lacks @FunctionalInterface on Observer signature

Paul Benedict pbenedict at apache.org
Thu Nov 21 19:50:16 PST 2013


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


More information about the lambda-dev mailing list