Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-11-25 Thread Alexey Ivanov
+1 On 23/11/2019 00:03, Sergey Bylokhov wrote: Looks fine. On 11/21/19 3:00 am, Pankaj Bansal wrote: Hi Sergey, << 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() expec

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-11-22 Thread Sergey Bylokhov
Alexey Ivanov; swing-dev Subject: Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception 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 v

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-11-21 Thread Pankaj Bansal
lso made the formatting changes Alexey had asked for. Webrev: http://cr.openjdk.java.net/~pbansal/8230235/webrev04/ Regards, Pankaj -Original Message- From: Sergey Bylokhov Sent: Thursday, November 21, 2019 1:54 PM To: Pankaj Bansal; Alexey Ivanov; swing-dev Subject: Re: [14] RFR J

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-11-21 Thread Sergey Bylokhov
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.

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-11-19 Thread Alexey Ivanov
Hi Pankaj, Looks good to me. However, I suggest following the formatting of the surrounding code where arguments are aligned to the opening parenthesis: 797 Dimension d = adjustWidthHeight(img.getWidth(imageObserver), 798 img.getHeight(imageObserver)); (when the mail message i

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-11-18 Thread Pankaj Bansal
lar things in past without any issue. Also, I have a > mach5 job on all platforms with this test. It is green. Perfect! Thank you for confirming it. Regards, Alexey > > > Regards, > Pankaj Bansal > > -----Original Message- > From: Alexey Ivanov > Sent: Monday, No

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-11-18 Thread Alexey Ivanov
l platforms with this test. It is green. Perfect! Thank you for confirming it. Regards, Alexey Regards, Pankaj Bansal -Original Message- From: Alexey Ivanov Sent: Monday, November 18, 2019 5:38 PM To: Pankaj Bansal; Sergey Bylokhov; swing-dev Subject: Re: [14] RFR JDK-8230235 - Rende

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-11-18 Thread Pankaj Bansal
Hi Alexey, < [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception Hi Pankaj, I believe this piece of code: 793 synchronized (this) { 794 Image img = image; 795 Dimension d = adjustWidthHei

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-11-18 Thread Alexey Ivanov
/cr.openjdk.java.net/~pbansal/8230235/webrev02/ Regards, Pankaj -Original Message- From: Alexey Ivanov Sent: Wednesday, November 13, 2019 1:28 AM To: Sergey Bylokhov; Pankaj Bansal; swing-dev Subject: Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cau

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-11-18 Thread Pankaj Bansal
ergey Bylokhov; Pankaj Bansal; swing-dev Subject: Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception On 31/10/2019 19:53, Sergey Bylokhov wrote: > On 10/31/19 5:59 am, Pankaj Bansal wrote: >> << I guess that the problem is that

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-11-12 Thread Alexey Ivanov
On 31/10/2019 19:53, Sergey Bylokhov wrote: On 10/31/19 5:59 am, Pankaj Bansal wrote: << I guess that the problem is that the "image" is accessed w/o synchronization on "this" like in other places, but it will be necessary to add one null check before usage of "image". I have updated the code t

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-11-12 Thread Alexey Ivanov
in XML. I mean should be Backlash for closing tag is not standard HTML. Other than that, the test looks good. Regards, Alexey Regards, Pankaj -Original Message- From: Alexey Ivanov Sent: Wednesday, October 16, 2019 7:27 PM To: Pankaj Bansal; swing-dev Cc: Sergey Bylokhov Subject:

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-10-31 Thread Sergey Bylokhov
On 10/31/19 5:59 am, Pankaj Bansal wrote: << I guess that the problem is that the "image" is accessed w/o synchronization on "this" like in other places, but it will be necessary to add one null check before usage of "image". I have updated the code to access image with synchronization. But that

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-10-31 Thread Pankaj Bansal
< [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception Hi Pankaj, I'd like to confirm: 793 int width = image.getWidth(imageObserver); 794 if (image != null) { the image is not null at line 793, and a

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-10-16 Thread Alexey Ivanov
Hi Pankaj, I'd like to confirm: 793 int width = image.getWidth(imageObserver); 794 if (image != null) { the image is not null at line 793, and as the side effect of calling image.getWidth(imageObserver), image is set to null, right? This requires a comment, does

Re: [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-10-10 Thread Sergey Bylokhov
Hi, Pankaj. I guess that the problem is that the "image" is accessed w/o synchronization on "this" like in other places, but it will be necessary to add one null check before usage of "image". Also, it is not necessary to have a try/catch block in the test, just call the problematic method On

[14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

2019-10-10 Thread Pankaj Bansal
Hi All, Please review the following fix for jdk14. Bug: https://bugs.openjdk.java.net/browse/JDK-8230235 Webrev: http://cr.openjdk.java.net/~pbansal/8230235/webrev00/ Issue: Rendering HTML with empty img attribute and documentBaseKey set causes NPE Fix: The issues is introduced aft