Hey,

This patch fixes a bug that was exposed by Intel's testSuite in the
setMultipleMode method of List.java.  I have committed a new mauve test
file that tests that method. 

Could someone please approve/comment on this patch.

Thanks,
Tania

2006-08-24  Tania Bento  <[EMAIL PROTECTED]>

        * java/awt/List.java
        (setMultipleSelections(boolean)): If boolean is the same 
        value as the current value, nothing happens.  Also, if 
        boolean == false, then the first item on the list is
        selected.

        
Index: java/awt/List.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/List.java,v
retrieving revision 1.30
diff -u -r1.30 List.java
--- java/awt/List.java	1 Aug 2006 15:52:11 -0000	1.30
+++ java/awt/List.java	24 Aug 2006 18:19:05 -0000
@@ -315,12 +315,17 @@
 public void
 setMultipleSelections(boolean multipleMode)
 {  
-  this.multipleMode = multipleMode;
+  if (this.multipleMode == multipleMode)
+    return;
+  else
+    this.multipleMode = multipleMode;   
+  
+  if (multipleMode == false)
+    select(0);
 
   ListPeer peer = (ListPeer) getPeer ();
   if (peer != null)
-    peer.setMultipleMode (multipleMode);
-      
+    peer.setMultipleMode (multipleMode);    
 }
 
 /*************************************************************************/

Reply via email to