RFR: JDK-8314731 : Add support for the alt attribute in the image type input HTML tag [v2]

ScientificWare duke at openjdk.org
Mon Oct 23 08:54:39 UTC 2023


On Fri, 29 Sep 2023 12:41:10 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> ScientificWare has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update src/java.desktop/share/classes/javax/swing/text/html/FormView.java
>>   
>>   FormView.java : Remove a redundant space.
>>   
>>   Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>
>
> src/java.desktop/share/classes/javax/swing/text/html/FormView.java line 285:
> 
>> 283:                 button = icon.getImageLoadStatus() == MediaTracker.COMPLETE ? new JButton(icon) : new JButton(altAtt);
>> 284:             } catch (MalformedURLException e) {
>> 285:                 button = new JButton(srcAtt);
> 
> Suggestion:
> 
>                 button = new JButton(altAtt);
> 
> If `altAtt` is provided, it should be used to handle invalid `srcAtt` too.

@aivanov-jdk My apologies, I forgot to reply. I wanted to distinguish the two cases : (Missing resource or bad resource name) and malformed URL. Like in the previous example I gave.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15319#discussion_r1368333198


More information about the client-libs-dev mailing list