jeremias    2005/02/10 06:18:39

  Modified:    src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java
  Log:
  Some LMs don't need the childLM List. So create only when necessary.
  
  Revision  Changes    Path
  1.38      +7 -1      
xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
  
  Index: AbstractLayoutManager.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- AbstractLayoutManager.java        8 Feb 2005 09:17:50 -0000       1.37
  +++ AbstractLayoutManager.java        10 Feb 2005 14:18:39 -0000      1.38
  @@ -41,7 +41,7 @@
    */
   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 @@
        * @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 @@
           }
           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());
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to