[cp-patches] FYI: DefaultButtonModel.setSelected() fixlet

David Gilbert david.gilbert at object-refinery.com
Fri Jun 16 13:48:01 UTC 2006


This patch (committed) fixes a minor bug in the setSelected() method for the 
DefaultButtonModel class:

2006-06-16  David Gilbert  <david.gilbert at object-refinery.com>

	* javax/swing/DefaultButtonModel.java
	(setSelected): Use 'this', not null, for the item in the ItemEvent.

Mauve test update to follow.

Regards,

Dave
-------------- next part --------------
Index: javax/swing/DefaultButtonModel.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/DefaultButtonModel.java,v
retrieving revision 1.28
diff -u -r1.28 DefaultButtonModel.java
--- javax/swing/DefaultButtonModel.java	16 May 2006 19:48:39 -0000	1.28
+++ javax/swing/DefaultButtonModel.java	16 Jun 2006 13:39:32 -0000
@@ -466,14 +466,14 @@
     if (s)
       {
         fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
-                                           null, ItemEvent.SELECTED));
+                                           this, ItemEvent.SELECTED));
         if (group != null)
           group.setSelected(this, true);
       }
     else
       {
         fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
-                                           null, ItemEvent.DESELECTED));
+                                           this, ItemEvent.DESELECTED));
         if (group != null)
           group.setSelected(this, false);
       }


More information about the Classpath-patches mailing list