]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Create LinkedList only if it's needed.
authorJeremias Maerki <jeremias@apache.org>
Fri, 10 Jun 2005 11:34:21 +0000 (11:34 +0000)
committerJeremias Maerki <jeremias@apache.org>
Fri, 10 Jun 2005 11:34:21 +0000 (11:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198738 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java

index 22e3a0723cd13d6e2d6e722fe524b15f2d4bfe86..7149a345043dff8ff171d3ee94e97724dedb77d3 100644 (file)
@@ -246,7 +246,6 @@ public abstract class LeafNodeLayoutManager extends AbstractLayoutManager
                                            int alignment) {
         MinOptMax ipd;
         curArea = get(context);
-        LinkedList returnList = new LinkedList();
 
         if (curArea == null) {
             setFinished(true);
@@ -277,6 +276,7 @@ public abstract class LeafNodeLayoutManager extends AbstractLayoutManager
 
         // node is a fo:ExternalGraphic, fo:InstreamForeignObject,
         // fo:PageNumber or fo:PageNumberCitation
+        LinkedList returnList = new LinkedList();
         returnList.add(new KnuthInlineBox(areaInfo.ipdArea.opt, areaInfo.lead,
                                     areaInfo.total, areaInfo.middle,
                                     new LeafPosition(this, 0), false));