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

Prasanta Sadhukhan psadhukhan at openjdk.org
Tue Jan 31 12:34:27 UTC 2023


On Tue, 31 Jan 2023 11:18:11 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> OK..I have removed unconditional setting of DONE state..
>> But then as I mentioned, it would cause JCK failure, so I have reverted isDone() change too...
>
>> OK..I have removed unconditional setting of DONE state.. But then as I mentioned, it would cause JCK failure, so I have reverted isDone() change too...
> 
> Should we update the spec for `isDone()`? I think it's the right way because it makes the behaviour consistent. Doing so requires a CSR which will be the grounds for updating the JCK test.

I am not sure if it is entirely wrong..I will keep it as it is for now..I dont want to go in CSR route for now..
The present iteration takes care of reproducer and also satisifies JCK..
If in future it is needed, we can take a look..

>> Not sure I understand this...please elaborate...
>
> Something like this:
> 
> https://github.com/aivanov-jdk/jdk/blob/15580d0f1a3a9630b224bb567aacec03d825c777/test/jdk/javax/swing/SwingWorker/TestSwingWorker.java#L83-L90
> 
> You can take all the changes to the test as it is quicker and configurable.

Thanks for the test. I have updated..
Also, as per the spec you mentioned
https://github.com/openjdk/jdk/blob/810c8a271b4524ae776e2306ef699e04a7d145a2/src/java.desktop/share/classes/javax/swing/SwingWorker.java#L288-L293

I have added one more condition

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

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



More information about the client-libs-dev mailing list