]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugzilla #50435: Access denied (java.util.PropertyPermission org.apache.fop.fo.proper...
authorGlenn Adams <gadams@apache.org>
Sun, 8 Apr 2012 00:08:50 +0000 (00:08 +0000)
committerGlenn Adams <gadams@apache.org>
Sun, 8 Apr 2012 00:08:50 +0000 (00:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1310924 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/properties/PropertyCache.java
status.xml

index d08164b6c878897bd84c2af0dbbea4709078a448..76ed35d76cb913e22d34f266f20d92710ee363f2 100644 (file)
@@ -76,20 +76,26 @@ public final class PropertyCache<T> {
      * (case insensitive).
      */
     public PropertyCache() {
-        this.useCache = Boolean.valueOf(
-                System.getProperty("org.apache.fop.fo.properties.use-cache", "true"))
-                .booleanValue();
-        if (useCache) {
-            map = new ConcurrentHashMap<Integer, WeakReference<T>>();
-            putCounter = new AtomicInteger();
-            cleanupLock = new ReentrantLock();
-            hashCodeCollisionCounter = new AtomicInteger();
+        boolean useCache;
+        try {
+            useCache = Boolean.valueOf(
+                    System.getProperty("org.apache.fop.fo.properties.use-cache", "true"))
+                    .booleanValue();
+        } catch ( SecurityException e ) {
+            useCache = false;
+        }
+        if ( useCache ) {
+            this.map = new ConcurrentHashMap<Integer, WeakReference<T>>();
+            this.putCounter = new AtomicInteger();
+            this.cleanupLock = new ReentrantLock();
+            this.hashCodeCollisionCounter = new AtomicInteger();
         } else {
-            map = null;
-            putCounter = null;
-            cleanupLock = null;
-            hashCodeCollisionCounter = null;
+            this.map = null;
+            this.putCounter = null;
+            this.cleanupLock = null;
+            this.hashCodeCollisionCounter = null;
         }
+        this.useCache = useCache;
     }
 
     /**
index 1400161563206c7dde6c4c1ba2bad9c18449e936..a647cee7de024dc584425d4216d214cb855f82f6 100644 (file)
@@ -62,6 +62,9 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     -->
     <release version="FOP Trunk" date="TBD">
+      <action context="Code" dev="GA" type="fix" fixes-bug="50435" due-to="Armin Haaf">
+        Access denied (java.util.PropertyPermission org.apache.fop.fo.properties.use-cache read).
+      </action>
       <action context="Code" dev="GA" type="fix" fixes-bug="49763" due-to="Adrian Buza">
         Incorrect message when encountering a block in an inline in a footnote.
       </action>