8059591: Give TaskListener methods empty default implementations
authoralundblad
Thu, 13 Nov 2014 14:49:02 +0100
changeset 27554 9b1670378f8a
parent 27553 75321debd020
child 27555 5152f73fa93b
8059591: Give TaskListener methods empty default implementations Summary: Added empty default implementations for TaskListener methods. Reviewed-by: jfranck, ohrstrom
langtools/src/jdk.compiler/share/classes/com/sun/source/util/TaskListener.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/source/util/TaskListener.java	Wed Nov 12 19:05:17 2014 +0100
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/source/util/TaskListener.java	Thu Nov 13 14:49:02 2014 +0100
@@ -37,13 +37,19 @@
 {
     /**
      * Invoked when an event has begun.
+     *
+     * @implSpec The default implementation of this method does nothing.
+     *
      * @param e the event
      */
-    public void started(TaskEvent e);
+    default void started(TaskEvent e) { }
 
     /**
      * Invoked when an event has been completed.
+     *
+     * @implSpec The default implementation of this method does nothing.
+     *
      * @param e the event
      */
-    public void finished(TaskEvent e);
+    default void finished(TaskEvent e) { }
 }