* (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;
}
/**
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>