summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2016-01-07 14:03:28 +0000
committerSimon Steiner <ssteiner@apache.org>2016-01-07 14:03:28 +0000
commit82f47da3135a64d93b1c9b748f81c5d3d0325165 (patch)
treeb4e6b4c6b1c2cc10a78a46711b90661ab2a497d9
parent04e72f71a395ab2c2bef6b1f443849adfa4f3c6d (diff)
downloadxmlgraphics-fop-82f47da3135a64d93b1c9b748f81c5d3d0325165.tar.gz
xmlgraphics-fop-82f47da3135a64d93b1c9b748f81c5d3d0325165.zip
FOP-2560: PDF to PDF corrupt after reuse of FopFactoryfop-2_1
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-2_1@1723548 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/apps/FOUserAgent.java3
-rw-r--r--src/java/org/apache/fop/apps/FopFactory.java7
2 files changed, 2 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/apps/FOUserAgent.java b/src/java/org/apache/fop/apps/FOUserAgent.java
index 9e317f9a3..6434ce36e 100644
--- a/src/java/org/apache/fop/apps/FOUserAgent.java
+++ b/src/java/org/apache/fop/apps/FOUserAgent.java
@@ -134,6 +134,7 @@ public class FOUserAgent {
protected String keywords;
private final ImageSessionContext imageSessionContext;
+ private final SoftMapCache pdfObjectCache = new SoftMapCache(true);
/**
* Main constructor. <b>This constructor should not be called directly. Please use the
@@ -807,6 +808,6 @@ public class FOUserAgent {
}
public SoftMapCache getPDFObjectCache() {
- return factory.getPDFObjectCache();
+ return pdfObjectCache;
}
}
diff --git a/src/java/org/apache/fop/apps/FopFactory.java b/src/java/org/apache/fop/apps/FopFactory.java
index 50211d3bc..d9c9708eb 100644
--- a/src/java/org/apache/fop/apps/FopFactory.java
+++ b/src/java/org/apache/fop/apps/FopFactory.java
@@ -37,7 +37,6 @@ import org.apache.commons.logging.LogFactory;
import org.apache.xmlgraphics.image.loader.ImageContext;
import org.apache.xmlgraphics.image.loader.ImageManager;
import org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.FallbackResolver;
-import org.apache.xmlgraphics.image.loader.util.SoftMapCache;
import org.apache.xmlgraphics.util.UnitConv;
import org.apache.fop.apps.io.InternalResourceResolver;
@@ -83,8 +82,6 @@ public final class FopFactory implements ImageContext {
private final ColorSpaceCache colorSpaceCache;
- private final SoftMapCache pdfObjectCache = new SoftMapCache(true);
-
private final FopFactoryConfig config;
private final InternalResourceResolver resolver;
@@ -436,8 +433,4 @@ public final class FopFactory implements ImageContext {
public ColorSpaceCache getColorSpaceCache() {
return this.colorSpaceCache;
}
-
- public SoftMapCache getPDFObjectCache() {
- return pdfObjectCache;
- }
}