cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r372251 - /cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/transformation/IncludeTransformer.java
Date Wed, 25 Jan 2006 16:10:25 GMT
Author: jbq
Date: Wed Jan 25 08:10:23 2006
New Revision: 372251

URL: http://svn.apache.org/viewcvs?rev=372251&view=rev
Log:
Fix COCOON-1719: IncludeTransformer: source must not be cached if an error occurs

Modified:
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/transformation/IncludeTransformer.java

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/transformation/IncludeTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/transformation/IncludeTransformer.java?rev=372251&r1=372250&r2=372251&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/transformation/IncludeTransformer.java
(original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/transformation/IncludeTransformer.java
Wed Jan 25 08:10:23 2006
@@ -525,12 +525,18 @@
         /** Load URI into the provided handlers, process fallback */
         public void process(ContentHandler contentHandler, LexicalHandler lexicalHandler)
         throws SAXException {
-            if (this.fallback != null) {
-                SaxBuffer buffer = new SaxBuffer();
-                process(buffer);
-                buffer.toSAX(contentHandler);
-            } else {
-                process0(contentHandler, lexicalHandler);
+            try {
+                if (this.fallback != null) {
+                    SaxBuffer buffer = new SaxBuffer();
+                    process(buffer);
+                    buffer.toSAX(contentHandler);
+                } else {
+                    process0(contentHandler, lexicalHandler);
+                }
+            } catch (SAXException e) {
+                // source must not be cached if an error occurs
+                validity = null;
+                throw e;
             }
         }
 



Mime
View raw message