On Thu, 21 Aug 2025 02:30:11 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

> The `ImageIcon(Image)` constructor sets the description field to the value of 
> "comment" property if it's a string. The `ImageIcon(Image, String)` 
> constructor calls ImageIcon(Image). Since the two-parameter constructor 
> explicitly provides the value for the description field, the implicitly set 
> value for description is immediately overwritten, which is wasted work. 
> 
> Fix is to let `ImageIcon(Image, String) `constructor do the actual work of 
> setting the fields and loading the image

LGTM

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

Marked as reviewed by kizune (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/26873#pullrequestreview-3139009152

Reply via email to