[rfc][icedtea-web][policyeditor] Parent-window searching fix

Andrew Azores aazores at redhat.com
Wed Jun 25 13:34:17 UTC 2014


On 06/24/2014 03:20 PM, Omair Majid wrote:
> * Andrew Azores <aazores at redhat.com> [2014-06-24 15:13]:
>> If the Javadoc on this method is to be trusted then the semantics are
>> identical, and it seems to work fine anyway.
> Use the source :)
>
> It looks exactly the same.
>
>> -                            if (c == null) {
>> -                                return;
>> -                            }
>> +                        final Window w = SwingUtilities.getWindowAncestor(PolicyEditor.this);
> Just one nit: if the parent is null, the previous code returned without
> doing anything. getWindowAncestor can also return null, which we should
> handle identically.
>
> Thanks,
> Omair
>

Ah, right. I don't imagine it would return 'null', but better to 
trivially handle it than allow an NPE through :)

Thanks,

-- 
Andrew A

-------------- next part --------------
A non-text attachment was scrubbed...
Name: policyeditor-window-ancestor-2.patch
Type: text/x-patch
Size: 1531 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140625/6039c7f8/policyeditor-window-ancestor-2.patch>


More information about the distro-pkg-dev mailing list