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

2024-04-01 Thread Tejesh R
On Fri, 15 Mar 2024 14:45:36 GMT, Alexey Ivanov wrote: >> I'm adding a regression test for >> [JDK-8323670](https://bugs.openjdk.org/browse/JDK-8323670) and >> [JDK-8307091](https://bugs.openjdk.org/browse/JDK-8307091); it's also a >> regression test for >> [JDK-8240690](https://bugs.openjdk.

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

2024-03-31 Thread Sergey Bylokhov
On Fri, 29 Mar 2024 20:02:53 GMT, Alexey Ivanov wrote: >>> However, there are cases where instantiating and testing is safe on main >>> thread. >> >> That is my point, make it less safe - when the component is created on one >> thread:EDT and then for some reason accessed on a different thread

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

2024-03-31 Thread Sergey Bylokhov
On Fri, 15 Mar 2024 14:45:36 GMT, Alexey Ivanov wrote: >> I'm adding a regression test for >> [JDK-8323670](https://bugs.openjdk.org/browse/JDK-8323670) and >> [JDK-8307091](https://bugs.openjdk.org/browse/JDK-8307091); it's also a >> regression test for >> [JDK-8240690](https://bugs.openjdk.

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

2024-03-29 Thread Alexey Ivanov
On Fri, 29 Mar 2024 02:00:18 GMT, Sergey Bylokhov wrote: > > However, there are cases where instantiating and testing is safe on main > > thread. > > That is my point, make it less safe - when the component is created on one > thread:EDT and then for some reason accessed on a different thread,

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

2024-03-28 Thread Sergey Bylokhov
On Wed, 27 Mar 2024 20:19:41 GMT, Alexey Ivanov wrote: > However, there are cases where instantiating and testing is safe on main > thread. That is my point, make it less safe - when the component is created on one thread:EDT and then for some reason accessed on a different thread, the rescan

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

2024-03-27 Thread Alexey Ivanov
On Fri, 22 Mar 2024 21:45:36 GMT, Alexey Ivanov wrote: >>>Instantiating JFileChooser on EDT adds complexity for no benefit. The >>>JFileChooser is still accessed concurrently from several threads, including >>>Swing internal thread. >> >> But still, this is a common requirement to create UI co

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

2024-03-22 Thread Alexey Ivanov
On Fri, 22 Mar 2024 21:05:09 GMT, Sergey Bylokhov wrote: > > Instantiating JFileChooser on EDT adds complexity for no benefit. The > > JFileChooser is still accessed concurrently from several threads, including > > Swing internal thread. > > But still, this is a common requirement to create UI

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

2024-03-22 Thread Sergey Bylokhov
On Tue, 19 Mar 2024 17:03:25 GMT, Alexey Ivanov wrote: >Instantiating JFileChooser on EDT adds complexity for no benefit. The >JFileChooser is still accessed concurrently from several threads, including >Swing internal thread. But still, this is a common requirement to create UI components on

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

2024-03-19 Thread Alexey Ivanov
On Fri, 15 Mar 2024 11:17:08 GMT, Alexey Ivanov wrote: >> test/jdk/javax/swing/plaf/basic/BasicDirectoryModel/ConcurrentModification.java >> line 211: >> >>> 209: private static void deleteFile(final Path file) { >>> 210: try { >>> 211: Files.delete(file); >> >> Should

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

2024-03-19 Thread Alexey Ivanov
On Tue, 19 Mar 2024 01:08:25 GMT, Sergey Bylokhov wrote: >> 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

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

2024-03-18 Thread Sergey Bylokhov
On Fri, 15 Mar 2024 12:02:43 GMT, Alexey Ivanov 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

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

2024-03-15 Thread Alexey Ivanov
> I'm adding a regression test for > [JDK-8323670](https://bugs.openjdk.org/browse/JDK-8323670) and > [JDK-8307091](https://bugs.openjdk.org/browse/JDK-8307091); it's also a > regression test for > [JDK-8240690](https://bugs.openjdk.org/browse/JDK-8240690). > > I referenced this test in PR #17