RFR: 8139228: JFileChooser renders file names as HTML document [v4]

Tejesh R tr at openjdk.org
Thu May 22 06:57:38 UTC 2025


On Wed, 21 May 2025 16:47:29 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Tejesh R has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updated review comments
>
> test/jdk/javax/swing/JFileChooser/HTMLFileName.java line 61:
> 
>> 59:                      If it appears to be in HTML format with Pink color,
>> 60:                      then test fails.
>> 61:                      (Verify for all Look and Feel).
> 
> There's no way for the tester to verify all Look and Feels, unless they go out of their way and launch the test manually with different look and feels.
> 
> For this reason, I'd remove this line altogether.

Removed.

> test/jdk/javax/swing/JFileChooser/HTMLFileName.java line 110:
> 
>> 108:         jfc.putClientProperty("html.disable", htmlEnabled);
>> 109:         jfc.setControlButtonsAreShown(false);
>> 110:         JFrame frame = new JFrame((htmlEnabled) ? "HTML enabled" : "HTML disabled");
> 
> Suggestion:
> 
>         jfc.setControlButtonsAreShown(false);
> 
>         JFrame frame = new JFrame((htmlEnabled) ? "HTML enabled" : "HTML disabled");
> 
> It's better with a blank line that separates the two blocks of code.

Updated.

> test/jdk/javax/swing/JFileChooser/HTMLFileName.java line 126:
> 
>> 124:             return new File[]{
>> 125:                     new File("/", "<html><h1 color=#ff00ff><font " +
>> 126:                             "face=\"Comic Sans MS\">Swing Rocks!!!!111"),
> 
> Suggestion:
> 
>                             "face="Comic Sans MS">Swing Rocks!"),
> 
> Update this too.

Updated.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2101781284
PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2101780937
PR Review Comment: https://git.openjdk.org/jdk/pull/24439#discussion_r2101781523


More information about the client-libs-dev mailing list