On Mon, 11 Mar 2024 23:18:28 GMT, Alexander Zvegintsev <[email protected]>
wrote:
>> The `java/awt/FileDialog/RegexpFilterTest/RegexpFilterTest` test is written
>> to test the very specific functionality of `XFileDialogPeer`, so it
>> shouldn't be run on platforms other than Linux.
>>
>> We also need to set `sun.awt.disableGtkFileDialogs` to `true` to be able to
>> test `XFileDialogPeer`, because by default it tries to use the Gtk file
>> dialog if it is available.
>> The Gtk file dialog has a search field hidden under the magnifying glass
>> icon, but it has a different syntax.
>>
>> The Windows system file dialog allows you to use wildcard filtering in the
>> "File name" field by hitting the `enter` afterwards, but again, this test
>> was written to test our own file dialog implementation, not the system's.
>
> Alexander Zvegintsev has updated the pull request incrementally with one
> additional commit since the last revision:
>
> better chaining
Changes requested by aivanov (Reviewer).
test/jdk/java/awt/FileDialog/RegexpFilterTest.java line 65:
> 63: JButton show = new JButton("show");
> 64: show.addActionListener(e ->
> 65: new FileDialog(new Frame()).setVisible(true));
Suggestion:
new FileDialog((Frame) null).setVisible(true));
There's no meaningful owner, `null` should do. Alternatively, you can find the
top level owner of the `show` button, but I don't think it's worth the effort.
-------------
PR Review: https://git.openjdk.org/jdk/pull/18203#pullrequestreview-1930557050
PR Review Comment: https://git.openjdk.org/jdk/pull/18203#discussion_r1521150843