Review request for 7125456: [macosx] Programmatically selecting List item triggers an ItemEvent

Sergey Bylokhov sergey.bylokhov at oracle.com
Tue Jan 17 08:56:51 PST 2012


17.01.2012 14:26, Alexander Potochkin wrote:
> Hello
>
> Please review the following fix:
> http://cr.openjdk.java.net/~alexp/7125456/webrev.00/
>
> the bug's description is here:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7125456
Probably isSkipStateChangedEvent() should use getDelegateLock()?

  182         public boolean isSkipStateChangedEvent() {
  183             return skipStateChangedEvent;
  184         }
I mean that we setskipStateChangedEvent  to false under delegateLock  on main thread
getDelegate().setSkipStateChangedEvent(false);

but later we can read it on EDT without lock?

public void valueChanged(final ListSelectionEvent e) {
  192             if (!e.getValueIsAdjusting()&&  !isSkipStateChangedEvent()) {


> Thanks
> alexp
>


-- 
Best regards, Sergey.



More information about the macosx-port-dev mailing list