ok..looks good to me.

Regards
Prasanta
On 06-Feb-19 2:49 PM, Manajit Halder wrote:
Hi Prasanta,

Thanks for your review comment. Please find my reply inline to your comments. Updated webbed: http://cr.openjdk.java.net/~mhalder/8207938/webrev.01/ <http://cr.openjdk.java.net/%7Emhalder/8207938/webrev.01/>

Regards,
Manajit

On 05-Feb-2019, at 3:49 PM, Prasanta Sadhukhan <prasanta.sadhuk...@oracle.com <mailto:prasanta.sadhuk...@oracle.com>> wrote:

Hi Manajit,

I see that IconObserver object is used in updateNativeImage()
209 CImage cimage = CImage.getCreator().createFromImage(image, observer); 210 boolean imageAutoSize = target.isImageAutoSize();

target is already checked for null in imageUpdate method callback and hence null check not required in updateNativeImage() method. If target is null then CTrayIcon constructor is called and target is set again.
If there is an invalid tray icon target, then wouldn't it cause NPE @210 also? 211 cimage.execute(imagePtr -> { can cimage be null? in that case 211 can cause NPE too?

Yes it might, added null check.
Also, I see that target is made null during dispose(), can you check is it null because TrayIcon is disposed?
Yes, TrayIcon is disposed and set to null when TrayIcon image is removed from the System tray. TrayIcon is re-initialized when TrayIcon image is added to System tray if it is null.


Regards Prasanta
On 05-Feb-19 3:21 PM, Manajit Halder wrote:
Hi All,

Please review the fix for JDK13.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8207938

Webrev:
http://cr.openjdk.java.net/~mhalder/8207938/webrev.00/ <http://cr.openjdk.java.net/%7Emhalder/8207938/webrev.00/>

Fix:
Problem occur while trying to update native image with invalid tray icon target in the imageUpdate callback.

Regards,
Manajit



Reply via email to