<Swing Dev> [9] Review request for 7094099: DropDown List of JComboBox detached

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Feb 17 13:22:46 UTC 2014


The fix looks good. Not that null check in (o != null && o instanceof 
ChangeListener) is unnecessary.

On 14.02.2014 20:12, anton nashatyrev wrote:
> Hi Sergey,
>
>     The listener here is intended for the AppContext whole lifecycle 
> and should not be removed until AppContext is disposed.
>     Just picked this up from usages of other AppContext keys. As far 
> as I understand StringBuffer is used instead of String for security 
> reasons: AppContext uses IdentityHashMap and in theory client code may 
> gain access to the AppContext entries by using key string.
>
> Thank you!
> Anton.
>
> On 14.02.2014 19:59, Sergey Bylokhov wrote:
>> Hi, Anton.
>> When this listener should be cleaned? Why StringBuffer is used as a key?
>>
>> On 2/14/14 7:27 PM, anton nashatyrev wrote:
>>> Hello,
>>>     could you please review the following fix:
>>>
>>> fix: http://cr.openjdk.java.net/~anashaty/7094099/9/webrev.00/ 
>>> <http://cr.openjdk.java.net/%7Eanashaty/7094099/9/webrev.00/>
>>> bug: https://bugs.openjdk.java.net/browse/JDK-7094099
>>>
>>> This is the open part of the whole fix which adds a hook to the 
>>> Swing so the Applet could track the opening/closing of the Swing 
>>> popup menus. For this the special ChangeListener is passed in the 
>>> AppContext. If the MenuSelectionManager finds it the listener is added.
>>>
>>> Thanks!
>>> Anton.
>>
>>
>


-- 
Best regards, Sergey.




More information about the swing-dev mailing list