harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [jira] Commented: (HARMONY-6009) [classlib][beans] NPE launching swingset2 example
Date Wed, 19 Nov 2008 09:50:40 GMT
Hi Kevin,

Kevin Zhou wrote:
> I think this defect may be a thread-safe problem.
> I read HARMONY's PropertyChangeSupport code and found that:
> It employs ArrayList to store the property change listeners which is not
> thread-safe.
> This defect occurs in a private doFirePropertyChange method.
> This method may asynchronously use the list of PropertyChangeListener, which
> contains a null value when modification (add or remove) of the list has not
> finished.

Yes, I put in some trace code and there is a null stored in the
globalListeners list which causes the NPE.

However, I don't see where that null could have been stored.  Can you
suggest what part of the code has stored the null in there?  Every add
to the list first checks for null.  I'll take a look and see if I can
catch it in the test.

I won't apply your 'check-for-null' patch since I think that just masks
the underlying problem.


View raw message