xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r1026006 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/render: afp/extensions/AFPExtensionHandler.java pdf/extensions/PDFExtensionHandler.java ps/extensions/PSExtensionHandler.java
Date Thu, 21 Oct 2010 14:12:07 GMT
Author: jeremias
Date: Thu Oct 21 14:12:07 2010
New Revision: 1026006

URL: http://svn.apache.org/viewvc?rev=1026006&view=rev
Log:
Copy attributes since some XML parsers might reuse the Attributes instance.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java?rev=1026006&r1=1026005&r2=1026006&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java
Thu Oct 21 14:12:07 2010
@@ -24,6 +24,7 @@ import java.net.URISyntaxException;
 
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
 import org.xml.sax.helpers.DefaultHandler;
 
 import org.apache.commons.logging.Log;
@@ -53,7 +54,7 @@ public class AFPExtensionHandler extends
                 throws SAXException {
         boolean handled = false;
         if (AFPExtensionAttachment.CATEGORY.equals(uri)) {
-            lastAttributes = attributes;
+            lastAttributes = new AttributesImpl(attributes);
             handled = true;
             if (localName.equals(AFPElementMapping.NO_OPERATION)
                     || localName.equals(AFPElementMapping.TAG_LOGICAL_ELEMENT)

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java?rev=1026006&r1=1026005&r2=1026006&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java
Thu Oct 21 14:12:07 2010
@@ -21,6 +21,7 @@ package org.apache.fop.render.pdf.extens
 
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
 import org.xml.sax.helpers.DefaultHandler;
 
 import org.apache.commons.logging.Log;
@@ -48,7 +49,7 @@ public class PDFExtensionHandler extends
                 throws SAXException {
         boolean handled = false;
         if (PDFExtensionAttachment.CATEGORY.equals(uri)) {
-            lastAttributes = attributes;
+            lastAttributes = new AttributesImpl(attributes);
             handled = false;
             if (localName.equals(PDFEmbeddedFileExtensionAttachment.ELEMENT)) {
                 //handled in endElement

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java?rev=1026006&r1=1026005&r2=1026006&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java
Thu Oct 21 14:12:07 2010
@@ -21,6 +21,7 @@ package org.apache.fop.render.ps.extensi
 
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
 import org.xml.sax.helpers.DefaultHandler;
 
 import org.apache.commons.logging.Log;
@@ -49,7 +50,7 @@ public class PSExtensionHandler extends 
                 throws SAXException {
         boolean handled = false;
         if (PSExtensionAttachment.CATEGORY.equals(uri)) {
-            lastAttributes = attributes;
+            lastAttributes = new AttributesImpl(attributes);
             handled = false;
             if (localName.equals(PSSetupCode.ELEMENT)
                     || localName.equals(PSSetPageDevice.ELEMENT)



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message