diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/fo/properties/PropertyCache.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/fo/properties/PropertyCache.java b/src/java/org/apache/fop/fo/properties/PropertyCache.java index 6fe36e0b8..b5f4f90ba 100644 --- a/src/java/org/apache/fop/fo/properties/PropertyCache.java +++ b/src/java/org/apache/fop/fo/properties/PropertyCache.java @@ -268,9 +268,13 @@ public final class PropertyCache { * @param c Runtime type of the objects that will be stored in the cache */ public PropertyCache(Class c) { - this.useCache = Boolean.getBoolean("org.apache.fop.fo.properties.use-cache"); - for (int i = SEGMENT_MASK + 1; --i >= 0;) { - segments[i] = new CacheSegment(); + this.useCache = Boolean.valueOf(System.getProperty( + "org.apache.fop.fo.properties.use-cache", "true") + ).booleanValue(); + if (useCache) { + for (int i = SEGMENT_MASK + 1; --i >= 0;) { + segments[i] = new CacheSegment(); + } } this.runtimeType = c; } |