RFR: 8139228: JFileChooser renders file names as HTML document

Alexey Ivanov aivanov at openjdk.org
Thu Apr 17 10:57:46 UTC 2025


On Thu, 17 Apr 2025 10:44:57 GMT, Tejesh R <tr at openjdk.org> wrote:

>>> Why the windows is skipped?
>> 
>> Because it's impossible to create a file with `<html>` in the name on Windows.
>> 
>>> Don't you need to check all L&F and platforms? as of now you validated metal(default on linux) and aqua(default on mac).
>> 
>> A good point. Validating other L&Fs would be good.
>> 
>> I wonder if the test can be automated, it would make validating all L&F so much easier.
>
> Making an automated test would be difficult, because the text/html is totally OS and L&F dependant. Example without fix in macos the file name will be empty on filepane and in combobox it shows as HTML text. But it doesn't hold the same for other L&F and in linux.

OS or L&F dependant?

macOS uses Aqua by default, Linux uses Metal by default. The behaviour in different L&F could be different.

The test may be customised for a L&F if needed… and it's likely required. I haven't looked into it yet, so I can't suggest anything. Exploring the possibility of making the test automatic is worth the effort.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2048708247


More information about the client-libs-dev mailing list