RFR: 8327137: Add test for ConcurrentModificationException in BasicDirectoryModel [v3]

Sergey Bylokhov serb at openjdk.org
Tue Mar 19 01:11:20 UTC 2024


On Fri, 15 Mar 2024 12:02:43 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> test/jdk/javax/swing/plaf/basic/BasicDirectoryModel/ConcurrentModification.java line 99:
>> 
>>> 97:             createFiles(temp);
>>> 98: 
>>> 99:             final JFileChooser fc = new JFileChooser(temp.toFile());
>> 
>> it should be created on EDT, just in case.
>
> I don't think it matters here… The test does not rely on even processing on EDT, no state of `JFileChooser` is modified except for calling `rescanCurrentDirectory`. Technically, I am not allowed to do so either. But if I call `rescanCurrentDirectory` from EDT only, the test becomes void.

I think it will fire the property change events via firePropertyChange from the constructor and it is better to do that on EDT.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18109#discussion_r1529545568


More information about the client-libs-dev mailing list