Hi, This should get rid of the last regression that builder is complaining about (technically it isn't a regression, the test got changed to not expect a NullPointerException). It simply changes the Hashtable that doesn't allow null keys to a HashMap. The class wasn't thread-safe in the first place.
2006-02-03 Mark Wielaard <[EMAIL PROTECTED]>
* javax/swing/event/SwingPropertyChangeSupport.java
(propertyListeners): Change type to HashMap.
(SwingPropertyChangeSupport): Allocate HashMap.
A real fix would of course be to consolidate this class with its beans
super class PropertyChangeSupport and add the new 1.5 awt.Component
firePropertyChange() methods so JComponent and Component can just the
same change support mechanism. But that was a bit more work then I
wanted to do now to get rid of this one last builder mauve regression :)
Cheers,
Mark
Index: javax/swing/event/SwingPropertyChangeSupport.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/event/SwingPropertyChangeSupport.java,v
retrieving revision 1.8
diff -u -r1.8 SwingPropertyChangeSupport.java
--- javax/swing/event/SwingPropertyChangeSupport.java 12 Oct 2005 09:00:26 -0000 1.8
+++ javax/swing/event/SwingPropertyChangeSupport.java 3 Feb 2006 11:05:41 -0000
@@ -1,5 +1,5 @@
/* SwingPropertyChangeSupport.java --
- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,7 +43,7 @@
import java.beans.PropertyChangeSupport;
import java.util.ArrayList;
import java.util.EventListener;
-import java.util.Hashtable;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -72,7 +72,7 @@
* [EMAIL PROTECTED] EventListenerList} instances (which record the listener(s) for the
* given property).
*/
- private Hashtable propertyListeners;
+ private HashMap propertyListeners;
/**
* The object that is used as the default source for the
@@ -92,7 +92,7 @@
super(source);
this.source = source;
this.listeners = new EventListenerList();
- this.propertyListeners = new Hashtable();
+ this.propertyListeners = new HashMap();
}
/**
signature.asc
Description: This is a digitally signed message part
