SwingWorker done() method [spec ](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/SwingWorker.java#L452) says "Executed on the Event Dispatch Thread after the doInBackground method is finished" but there's no mechanism in place to honor that claim. The [spec](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/SwingWorker.java#L289) also says the state should be DONE after doInBackground() returns which is also not done.
Modified the code to honour the specification. ------------- Commit messages: - Fix - Fix - 8081474: SwingWorker calls 'done' before the 'doInBackground' is finished Changes: https://git.openjdk.org/jdk/pull/11940/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11940&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8081474 Stats: 96 lines in 2 files changed: 93 ins; 2 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/11940.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11940/head:pull/11940 PR: https://git.openjdk.org/jdk/pull/11940
