<AWT Dev> <AWT dev>[13] Review request for JDK-8207938: At step6, Click Add button, case failed automatically.
Manajit Halder
manajit.halder at oracle.com
Wed Feb 6 09:19:54 UTC 2019
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/~mhalder/8207938/webrev.01/>
Regards,
Manajit
> On 05-Feb-2019, at 3:49 PM, Prasanta Sadhukhan <prasanta.sadhukhan at 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 <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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/awt-dev/attachments/20190206/557fbad5/attachment.html>
More information about the awt-dev
mailing list