-
CSR
-
Resolution: Withdrawn
-
P4
-
None
-
behavioral
-
medium
-
Might pose problem to application which is implemented w.r.t wrong spec
-
Java API
-
SE
Summary
SwingWorker spec is ambiguous in some parts with regards to sequence of execution being performed, which is now being rectified.
Problem
The order of execution mentioned in the class description was wrong with respect to the spec mentioned in the code. It was ambiguous as to when done
method will be called, when state will be changed to DONE etc
Solution
Along with code rectification of done
method being called AFTER doInBackground
as is described in the spec, the wording is also recitified to clarify done will be called at the end after doInBackground
is finished and state changed to DONE
Specification
javax.swing.SwingWorker
* <p>
* Before the {@code doInBackground} method is invoked on a <i>worker</i> thread,
* {@code SwingWorker} notifies any {@code PropertyChangeListeners} about the
* {@code state} property change to {@code StateValue.STARTED}. After the
- * {@code doInBackground} method is finished the {@code done} method is
- * executed. Then {@code SwingWorker} notifies any {@code PropertyChangeListeners}
- * about the {@code state} property change to {@code StateValue.DONE}.
+ * {@code doInBackground} method is finished, {@code SwingWorker} notifies
+ * any {@code PropertyChangeListeners} about the {@code state} property
+ * change to {@code StateValue.DONE}. Finally, {@code done} method is executed.
*
* <p>
* {@code SwingWorker} is only designed to be executed once. Executing a
* {@code SwingWorker} more than once will not result in invoking the
* {@code doInBackground} method twice.
- csr of
-
JDK-8081474 SwingWorker calls 'done' before the 'doInBackground' is finished
-
- Resolved
-