Yes, this code looked suspicious for me as well, I suspect it is a result of 
copy pasting XWindow's dispose() code.  For a wrong peer/target pair, 
XToolkit.targetDisposedPeer() is a no-op, so no harm is done, but perhaps it 
makes sense to remove that call altogether.  I'll check it.

On Sep 27, 2013, at 9:25 PM, Sergey Bylokhov <sergey.bylok...@oracle.com> wrote:

> Hi, Leonid.
> In this case the code in the XBaseMenuWindow.doDispose() call 
> XToolkit.targetDisposedPeer(target, this); for the wrong target? Or probably 
> this target is alwase null?
> 
> On 27.09.2013 20:32, Leonid Romanov wrote:
>> Hello,
>> Please review a fix for 8023994: Right click on the icon added to the system 
>> tray for the first time, java.lang.IllegalArgumentException thrown. The 
>> problem here is that for popup menus the "target" field of XBaseMenuWindow 
>> class is not a MenuComponent corresponding to the popup, but a component for 
>> which the popup is being shown. Therefore, if the menu has never been shown, 
>> the the target is null, so we can't use it for the InvocationEvent in 
>> dispose().
>> 
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8023994
>> Webrev: http://cr.openjdk.java.net/~leonidr/8023994/webrev.00/
>> 
>> Thanks,
>> Leonid.
>> 
>> 
>> 
> 
> 
> -- 
> Best regards, Sergey.
> 

Reply via email to