Author: gadams
Date: Sun Apr  8 00:08:50 2012
New Revision: 1310924

URL: http://svn.apache.org/viewvc?rev=1310924&view=rev
Log:
Bugzilla #50435: Access denied (java.util.PropertyPermission 
org.apache.fop.fo.properties.use-cache read).

Modified:
    
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyCache.java
    xmlgraphics/fop/trunk/status.xml

Modified: 
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyCache.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyCache.java?rev=1310924&r1=1310923&r2=1310924&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyCache.java 
(original)
+++ 
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyCache.java 
Sun Apr  8 00:08:50 2012
@@ -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;
     }
 
     /**

Modified: xmlgraphics/fop/trunk/status.xml
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=1310924&r1=1310923&r2=1310924&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Sun Apr  8 00:08:50 2012
@@ -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>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to