JDK-8101983 : Add @FunctionalInterface to EventHandler, Callback
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: base
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-02-19
  • Updated: 2015-06-16
  • Resolved: 2013-07-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Blocks :  
Description
The @FunctionalInterface annotation was added in Java 8 and is intended to be used to annotate an interface which is meant to always be a Single Abstract Method interface, such as is meant to be used by lambda expressions. We ought to add this annotation to any SAM interfaces in the public API.

This will require we build against Java 8.
Comments
Didn't realize that FunctionalInterface was in java.lang. I'm just going to delete the interface from the backport, especially since it is advisory to the compiler rather than functional to the runtime.
26-07-2013

I'll do some research tonight, but I don't see it as being a problem for the backport, so fire at will. My plan would be to create a shadow of the annotation and put source retention on it. Ideally it would be in the exact same spot, if not I would just need to mess with some imports in that case, which create less obtrusive maintenance issues for the backport.
18-07-2013

Added Danno as a watcher so he can chime in. I think adding the @FunctionalInterface annotation to the back-port might work? Or he'd have to weed out these few places. Danno?
18-07-2013

Can I work on this issue already? I'm asking because AFAIK we still don't want JDK8 features that might cause troubles to JDK7 backporters, but I'm not sure if this is one of them.
18-07-2013