aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Adams <gadams@apache.org>2012-04-08 19:02:03 +0000
committerGlenn Adams <gadams@apache.org>2012-04-08 19:02:03 +0000
commit656f7b54b5ef98d2ab55142e411a0427c92d193c (patch)
treef8717c737f0b6eafeed466ae6dbd415c8adb4ba0
parent3c971b0b855141a3d4a94d44b5ab213dd093a47f (diff)
downloadxmlgraphics-fop-656f7b54b5ef98d2ab55142e411a0427c92d193c.tar.gz
xmlgraphics-fop-656f7b54b5ef98d2ab55142e411a0427c92d193c.zip
Bugzilla #50435: Use true as default for properties use-cache in case of access exception.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1311070 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/fo/properties/PropertyCache.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fo/properties/PropertyCache.java b/src/java/org/apache/fop/fo/properties/PropertyCache.java
index 76ed35d76..f35ab2dad 100644
--- a/src/java/org/apache/fop/fo/properties/PropertyCache.java
+++ b/src/java/org/apache/fop/fo/properties/PropertyCache.java
@@ -82,7 +82,9 @@ public final class PropertyCache<T> {
System.getProperty("org.apache.fop.fo.properties.use-cache", "true"))
.booleanValue();
} catch ( SecurityException e ) {
- useCache = false;
+ useCache = true;
+ LOG.info("Unable to access org.apache.fop.fo.properties.use-cache"
+ + " due to security restriction; defaulting to 'true'.");
}
if ( useCache ) {
this.map = new ConcurrentHashMap<Integer, WeakReference<T>>();