[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: JList.setModel() argument check
From: |
David Gilbert |
Subject: |
[cp-patches] FYI: JList.setModel() argument check |
Date: |
Wed, 09 Nov 2005 10:52:43 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20051026) |
I committed this small change to fix two failing Mauve tests:
2005-11-09 David Gilbert <address@hidden>
* javax/swing/JList.java
(setModel): throw IllegalArgumentException for null model.
Regards,
Dave
Index: javax/swing/JList.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JList.java,v
retrieving revision 1.38
diff -u -r1.38 JList.java
--- javax/swing/JList.java 26 Oct 2005 19:09:52 -0000 1.38
+++ javax/swing/JList.java 9 Nov 2005 10:45:35 -0000
@@ -1620,10 +1620,15 @@
* #listListener} is unsubscribed from the existing model, if it exists,
* and re-subscribed to the new model.
*
- * @param model The new property value
+ * @param model the new model (<code>null</code> not permitted).
+ *
+ * @throws IllegalArgumentException if <code>model</code> is
+ * <code>null</code>.
*/
public void setModel(ListModel model)
{
+ if (model == null)
+ throw new IllegalArgumentException("Null 'model' argument.");
if (this.model == model)
return;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: JList.setModel() argument check,
David Gilbert <=