On Mon, 17 May 2021 07:31:45 GMT, Stephen Colebourne <[email protected]>
wrote:
>> src/java.base/share/classes/java/time/InstantSource.java line 93:
>>
>>> 91: * @since 17
>>> 92: */
>>> 93: public interface InstantSource {
>>
>> Should not we add `@FunctionalInterface`? I can easily imagine this
>> interface being used in tests where we can define the `InstantSource` with
>> lambdas.
>
> `@FunctionalInterface` isn't required for use by lambdas. I wasn't initially
> convinced using it here was the right choice.
Right, it's about signaling that it's safe to be used with a
lambda/method-reference, so it's not required but a nice to have, very like
@Override.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4016