|
From: Pavel V. <va...@us...> - 2002-09-10 19:35:03
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime
In directory usw-pr-cvs1:/tmp/cvs-serv9474
Modified Files:
ImageR.java
Log Message:
by lukas
Index: ImageR.java
===================================================================
RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/ImageR.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** ImageR.java 3 Sep 2002 17:48:08 -0000 1.15
--- ImageR.java 10 Sep 2002 19:34:56 -0000 1.16
***************
*** 131,137 ****
* list.
*/
! private Map childListeners=new HashMap(1);
/** Maps from image child type to <code>ChildrenListener</code> list. */
! private Map imageChildListeners=new HashMap(1);
/** This object is returned by getTimerTask(). */
--- 131,137 ----
* list.
*/
! private Map childListeners=Collections.synchronizedMap(new HashMap(1));
/** Maps from image child type to <code>ChildrenListener</code> list. */
! private Map imageChildListeners=Collections.synchronizedMap(new HashMap(1));
/** This object is returned by getTimerTask(). */
***************
*** 1252,1258 ****
task=new TimerTask() {
public void run() {
! Iterator it=childListeners.keySet().iterator();
! while (it.hasNext()) {
! Long key=(Long) it.next();
int type=(int) (key.longValue() >> 32);
int objId=(int) key.longValue();
--- 1252,1261 ----
task=new TimerTask() {
public void run() {
! // the set may change, so we cannot safely iterate, we make
! // a copy and go through the copy.
! Long[] keys=(Long[]) childListeners.keySet().toArray(new
! Long[0]);
! for (int i=0; i<keys.length; i++) {
! Long key=keys[i];
int type=(int) (key.longValue() >> 32);
int objId=(int) key.longValue();
***************
*** 1261,1267 ****
data.refresh(type);
}
! it=imageChildListeners.keySet().iterator();
! while (it.hasNext()) {
! Long key=(Long) it.next();
int type=(int) (key.longValue() >> 32);
--- 1264,1272 ----
data.refresh(type);
}
!
! keys=(Long[]) imageChildListeners.keySet().toArray(new
! Long[0]);
! for (int i=0; i<keys.length; i++) {
! Long key=keys[i];
int type=(int) (key.longValue() >> 32);
|