This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: BasicFileChooserUI.getApproveButtonText()


This patch adds a check for a null argument in the getApproveButtonText() method:

2005-12-19 David Gilbert <david.gilbert@object-refinery.com>

* gnu/testlet/javax/swing/plaf/basic/BasicFileChooserUI/getApproveButtonText.java:
(test): Add null argument test.


Regards,

Dave
Index: gnu/testlet/javax/swing/plaf/basic/BasicFileChooserUI/getApproveButtonText.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/plaf/basic/BasicFileChooserUI/getApproveButtonText.java,v
retrieving revision 1.1
diff -u -r1.1 getApproveButtonText.java
--- gnu/testlet/javax/swing/plaf/basic/BasicFileChooserUI/getApproveButtonText.java	13 Oct 2005 08:39:46 -0000	1.1
+++ gnu/testlet/javax/swing/plaf/basic/BasicFileChooserUI/getApproveButtonText.java	19 Dec 2005 12:19:15 -0000
@@ -51,6 +51,18 @@
     harness.check(ui.getApproveButtonText(fc), "Save");
     fc.setApproveButtonText("Hello World!");    
     harness.check(ui.getApproveButtonText(fc), "Hello World!");
+    
+    // try null argument
+    boolean pass = false;
+    try
+    {
+      /*String t =*/ ui.getApproveButtonText(null);
+    }
+    catch (NullPointerException e)
+    {
+      pass = true;
+    }
+    harness.check(pass);
   }
   
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]