<Swing Dev> [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Thu Nov 21 08:24:08 UTC 2019
On 11/18/19 3:50 am, Pankaj Bansal wrote:
> << You need to read the image to the local var under synchronization and then get W/H from the local image variable. I guess in this case both W/H will be 0 since error is occured?
> Done. As Alexey pointed, the values are set to -1 when the error occurs.
Is it fine that we pass "-1" to the "adjustWidthHeight"? I am not sure that it is ready for the negative values(where it calculates proportions). Note that prepareImage() expects only positive or "-1".
Should not we update the "WIDTH_FLAG | HEIGHT_FLAG" only if the newHeight/newWidth are positive?
--
Best regards, Sergey.
More information about the swing-dev
mailing list