cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r475908 - /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/Form.java
Date Thu, 16 Nov 2006 20:15:46 GMT
Author: vgritsenko
Date: Thu Nov 16 12:15:45 2006
New Revision: 475908

URL: http://svn.apache.org/viewvc?view=rev&rev=475908
Log:
cleanup event queue in finally, so that failing event 
does not "stick" in the queue.

Modified:
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/Form.java

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/Form.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/Form.java?view=diff&rev=475908&r1=475907&r2=475908
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/Form.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/Form.java
Thu Nov 16 12:15:45 2006
@@ -167,16 +167,19 @@
      */
     private void fireEvents() {
         if (this.events != null) {
-            CursorableLinkedList.Cursor cursor = this.events.cursor();
-            while(cursor.hasNext()) {
-                WidgetEvent event = (WidgetEvent)cursor.next();
-                event.getSourceWidget().broadcastEvent(event);
-                if (formHandler != null)
-                    formHandler.handleEvent(event);
+            try {
+                CursorableLinkedList.Cursor cursor = this.events.cursor();
+                while (cursor.hasNext()) {
+                    WidgetEvent event = (WidgetEvent) cursor.next();
+                    event.getSourceWidget().broadcastEvent(event);
+                    if (formHandler != null) {
+                        formHandler.handleEvent(event);
+                    }
+                }
+                cursor.close();
+            } finally {
+                this.events.clear();
             }
-            cursor.close();
-
-            this.events.clear();
         }
     }
 



Mime
View raw message