aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-02-10 14:18:39 +0000
committerJeremias Maerki <jeremias@apache.org>2005-02-10 14:18:39 +0000
commit855e36d206fe861aa07209f32792bc04c81b3b9a (patch)
tree4e5d85aadd9b4863e78f24026f7906a2091103e1 /src
parente3370491c2b4974ec7cf01952c64bfbd35ef83aa (diff)
downloadxmlgraphics-fop-855e36d206fe861aa07209f32792bc04c81b3b9a.tar.gz
xmlgraphics-fop-855e36d206fe861aa07209f32792bc04c81b3b9a.zip
Some LMs don't need the childLM List. So create only when necessary.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198413 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
index 45ef5e6e3..4edd78c3e 100644
--- a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
@@ -41,7 +41,7 @@ import java.util.Map;
*/
public abstract class AbstractLayoutManager implements LayoutManager, Constants {
protected LayoutManager parentLM = null;
- protected List childLMs = new ArrayList(10);
+ protected List childLMs = null;
protected ListIterator fobjIter = null;
protected Map markers = null;
@@ -453,6 +453,9 @@ public abstract class AbstractLayoutManager implements LayoutManager, Constants
* @see org.apache.fop.layoutmgr.LayoutManager#getChildLMs
*/
public List getChildLMs() {
+ if (childLMs == null) {
+ childLMs = new java.util.ArrayList(10);
+ }
return childLMs;
}
@@ -465,6 +468,9 @@ public abstract class AbstractLayoutManager implements LayoutManager, Constants
}
lm.setParent(this);
lm.initialize();
+ if (childLMs == null) {
+ childLMs = new java.util.ArrayList(10);
+ }
childLMs.add(lm);
log.trace(this.getClass().getName()
+ ": Adding child LM " + lm.getClass().getName());