Revision: 492
Author:   henryju
Date:     2006-06-22 04:52:54 -0700 (Thu, 22 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/jwebunit/?rev=492&view=rev

Log Message:
-----------
Fix bug [ 1194792 ]

Modified Paths:
--------------
    
trunk/jwebunit-httpunit-plugin/src/main/java/net/sourceforge/jwebunit/httpunit/HttpUnitDialog.java
Modified: 
trunk/jwebunit-httpunit-plugin/src/main/java/net/sourceforge/jwebunit/httpunit/HttpUnitDialog.java
===================================================================
--- 
trunk/jwebunit-httpunit-plugin/src/main/java/net/sourceforge/jwebunit/httpunit/HttpUnitDialog.java
  2006-06-22 11:42:55 UTC (rev 491)
+++ 
trunk/jwebunit-httpunit-plugin/src/main/java/net/sourceforge/jwebunit/httpunit/HttpUnitDialog.java
  2006-06-22 11:52:54 UTC (rev 492)
@@ -649,15 +649,15 @@
      */
     private Button getButton(String buttonId) {
         Button btn = null;
-            try {
-                WebForm[] forms = resp.getForms();
-                for (int i = 0; i < forms.length; i++) {
-                    if ((btn = forms[i].getButtonWithID(buttonId)) != null)
-                        break;
-                }
-            } catch (SAXException e) {
-                throw new RuntimeException(e);
+        try {
+            WebForm[] forms = resp.getForms();
+            for (int i = 0; i < forms.length; i++) {
+                if ((btn = forms[i].getButtonWithID(buttonId)) != null)
+                    break;
             }
+        } catch (SAXException e) {
+            throw new RuntimeException(e);
+        }
         return btn;
     }
 
@@ -1242,12 +1242,14 @@
                 Attr foundAttribute = (Attr) foundAttributes.item(i);
                 Attr givenAttribute = (Attr) givenAttributes
                         .getNamedItem(foundAttribute.getName());
+                if (givenAttribute == null) {
+                    return false;
+                }
                 if (!foundAttribute.getValue()
                         .equals(givenAttribute.getValue())) {
                     return false;
                 }
             }
-
             return true;
         }
     }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to