RFR: 8352740: Introduce new factory method HtmlTree.IMG [v3]
Nizar Benalla
nbenalla at openjdk.org
Wed Mar 26 12:48:14 UTC 2025
On Tue, 25 Mar 2025 12:21:29 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:
>> Please review this small patch to add a new factory method `HtmlTree IMG(DocPath src, String alt)`, to provide a convenient way to reliably create valid tree nodes.
>>
>> Previously, all uses of `HtmlTag.IMG` followed a similar pattern :
>>
>> HtmlTree.of(HtmlTag.IMG)
>> .put(HtmlAttr.SRC, docpath)
>> .put(HtmlAttr.ALT, alt)
>>
>>
>> However, it was easy to forget to add the required "alt" attribute. Those have been replaced by the new factory method.
>>
>> No tests are required as part of this change.
>>
>> TIA
>
> Nizar Benalla has updated the pull request incrementally with one additional commit since the last revision:
>
> feedback: document params of the factory method.
Thanks for the review!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24204#issuecomment-2754281577
More information about the javadoc-dev
mailing list