cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r729854 - /cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/component/sax/XMLSerializer.java
Date Mon, 29 Dec 2008 10:22:58 GMT
Author: reinhard
Date: Mon Dec 29 02:22:57 2008
New Revision: 729854

URL: http://svn.apache.org/viewvc?rev=729854&view=rev
Log:
Create serialization properties only when they are needed

Modified:
    cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/component/sax/XMLSerializer.java

Modified: cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/component/sax/XMLSerializer.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/component/sax/XMLSerializer.java?rev=729854&r1=729853&r2=729854&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/component/sax/XMLSerializer.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/component/sax/XMLSerializer.java
Mon Dec 29 02:22:57 2008
@@ -38,7 +38,7 @@
     private static final SAXTransformerFactory SAX_TRANSFORMER_FACTORY = (SAXTransformerFactory)
TransformerFactory
             .newInstance();
 
-    private Properties format = new Properties();
+    private Properties format;
 
     private TransformerHandler transformerHandler;
 
@@ -57,9 +57,6 @@
         } catch (TransformerConfigurationException e) {
             throw new SetupException("Can't setup transformer handler for the serializer.",
e);
         }
-        this.transformerHandler.getTransformer().setOutputProperties(this.format);
-        this.setContentHandler(this.transformerHandler);
-        this.setLexicalHandler(this.transformerHandler);
 
         // set a default format because some transformer implementations run
         // into NPEs if it is missing
@@ -67,6 +64,10 @@
             this.format = new Properties();
             this.format.put("method", "xml");
         }
+        this.transformerHandler.getTransformer().setOutputProperties(this.format);
+
+        this.setContentHandler(this.transformerHandler);
+        this.setLexicalHandler(this.transformerHandler);
     }
 
     public CacheKey constructCacheKey() {



Mime
View raw message