RFR: 8139228: JFileChooser renders file names as HTML document

Tejesh R tr at openjdk.org
Wed Apr 23 10:19:50 UTC 2025


On Tue, 22 Apr 2025 15:35:24 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> @mrserb You mean to say that, same issue would be their for Windows L&F too, since we are unable to test it directly it's been missed ?
>
>> > Because it's impossible to create a file with `<html>` in the name on Windows.
>> 
>> But is should be possible to trigger the bug using a custom FileSystemView without interacting with the actual file system?
> 
> An interesting idea. Using a custom `FileSystemView` for testing on Windows should be explored.
> 
>> @mrserb You mean to say that, same issue would be their for Windows L&F too, since we are unable to test it directly it's been missed ?
> 
> @TejeshR13 I'm pretty sure Windows L&F is affected too.
> 
> You could remediated the issue by setting `"html.disable"` on `FilePane`, but it may be not enough as you also modified `FileChooserUI` for each L&F.

I don't think we can reproduce this issue even with custom FileSystemView because windows doesn't allow to create a file with special characters, it just discard those special characters. Also it doesn't allow to create a new folder with special characters through JFileChooser also.

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

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


More information about the client-libs-dev mailing list