diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2007-10-26 18:17:00 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2007-10-26 18:17:00 +0000 |
commit | 00988a93d33e694bd6caf478bcff7daf92c4ba49 (patch) | |
tree | d637fa22adcdd96daeb2817eba5b0fa573476901 /src/java/org/apache/fop | |
parent | fb9e4e279d5f83eeabbd2fa69b1a342ab66429b8 (diff) | |
download | xmlgraphics-fop-00988a93d33e694bd6caf478bcff7daf92c4ba49.tar.gz xmlgraphics-fop-00988a93d33e694bd6caf478bcff7daf92c4ba49.zip |
Applying [PATCH] 43587 - Multiple ps:comment-? within fo:declarations causes ClassCastException
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@588733 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r-- | src/java/org/apache/fop/render/ps/PSRenderer.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/render/ps/PSRenderer.java b/src/java/org/apache/fop/render/ps/PSRenderer.java index 9e224a9b2..3befb0738 100644 --- a/src/java/org/apache/fop/render/ps/PSRenderer.java +++ b/src/java/org/apache/fop/render/ps/PSRenderer.java @@ -830,6 +830,7 @@ public class PSRenderer extends AbstractPathOrientedRenderer implements ImageAda PSExtensionAttachment comment = (PSExtensionAttachment)iter.next(); gen.commentln("%" + comment.getContent()); } + footerComments.clear(); } gen.writeDSCComment(DSCConstants.PAGES, new Integer(this.currentPageNumber)); gen.getResourceTracker().writeResources(false, gen); @@ -840,7 +841,12 @@ public class PSRenderer extends AbstractPathOrientedRenderer implements ImageAda IOUtils.closeQuietly(gen.getOutputStream()); rewritePostScriptFile(); } - this.pageDeviceDictionary.clear(); + if (footerComments != null) { + headerComments.clear(); + } + if (pageDeviceDictionary != null) { + pageDeviceDictionary.clear(); + } } /** @@ -910,12 +916,12 @@ public class PSRenderer extends AbstractPathOrientedRenderer implements ImageAda } } else if (attachment instanceof PSCommentBefore) { if (headerComments == null) { - headerComments = new java.util.TreeSet(); + headerComments = new java.util.ArrayList(); } headerComments.add(attachment); } else if (attachment instanceof PSCommentAfter) { if (footerComments == null) { - footerComments = new java.util.TreeSet(); + footerComments = new java.util.ArrayList(); } footerComments.add(attachment); } |