JFreeChart.notifyListeners bug?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
JR

JFreeChart.notifyListeners bug?

Post by JR » Thu Oct 10, 2002 10:26 pm

The code in JFreeChart.java, in the notifyListeners(ChartChangeEvent) method seems to prevent listeners from removing themselves in response to the event - a ConcurrentModificationException would be thrown when the List.remove(Object) is called.

Generally, a copy of the listeners (e.g. into an array) is iterated over, allowing the main listener list to be modified.

I haven't written the test code to produce this error, so I could be wrong... if so, sorry for bothering.

JR

Dave Gilbert

Re: JFreeChart.notifyListeners bug?

Post by Dave Gilbert » Thu Oct 10, 2002 11:15 pm

You are probably right...I will take a look.

Regards,

DG.

Locked