You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by ov...@apache.org on 2002/03/12 23:19:30 UTC
cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor AbstractParentProcessingNode.java
ovidiu 02/03/12 14:19:30
Modified: src/java/org/apache/cocoon/components/treeprocessor
AbstractParentProcessingNode.java
Log:
Correctly pop the map from the context in case of exceptions.
Revision Changes Path
1.2 +12 -9 xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNode.java
Index: AbstractParentProcessingNode.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/AbstractParentProcessingNode.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractParentProcessingNode.java 5 Mar 2002 08:26:22 -0000 1.1
+++ AbstractParentProcessingNode.java 12 Mar 2002 22:19:30 -0000 1.2
@@ -60,7 +60,7 @@
/**
*
* @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
- * @version CVS $Id: AbstractParentProcessingNode.java,v 1.1 2002/03/05 08:26:22 sylvain Exp $
+ * @version CVS $Id: AbstractParentProcessingNode.java,v 1.2 2002/03/12 22:19:30 ovidiu Exp $
*/
public abstract class AbstractParentProcessingNode extends AbstractProcessingNode {
@@ -80,16 +80,19 @@
context.pushMap(currentMap);
- for (int i = 0; i < nodes.length; i++) {
- if (nodes[i].invoke(env, context)) {
- // Success
- context.popMap();
- return true;
+ try {
+ for (int i = 0; i < nodes.length; i++) {
+ if (nodes[i].invoke(env, context)) {
+ // Success
+ return true;
+ }
}
}
-
- // No success
- context.popMap();
+ finally {
+ // No success
+ context.popMap();
+ }
+
return false;
}
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org