RFR: 8081474: SwingWorker calls 'done' before the 'doInBackground' is finished [v8]

Alexey Ivanov aivanov at openjdk.org
Wed Feb 1 22:43:23 UTC 2023


On Wed, 1 Feb 2023 19:42:30 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> > SwingWorker is used in JEditorPane as well as in jconsole packages. Yet I didn't look into the details how it's used.
> 
> I think all of that usages by jconsole will start to throw the "CancellationException" in the "done" method since now we will start to call it. Not sure can it cause some issue or not.

Why do you think so?

The `done` method hasn't thrown `CancellationException`, and it will not. If it had thrown the exception, Prasanta's test would've caught it.

Additionally, the `done` method *must* be called. It was called before, it is called now.

I cannot understand your concern.

-------------

PR: https://git.openjdk.org/jdk/pull/11940



More information about the client-libs-dev mailing list