From 6ac76ab07369f3f0d9596ac21e4f439b8e7d3ddd Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Sun, 6 Feb 2011 14:05:44 +0000 Subject: [PATCH] Minor fixup: extract condition into local variable git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1067668 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/layoutmgr/BlockStackingLayoutManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java index ee43be6fa..974222271 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java @@ -249,6 +249,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager referenceIPD = context.getRefIPD(); updateContentAreaIPDwithOverconstrainedAdjust(); + boolean isRestart = (lmStack != null); List contentList = new LinkedList(); List elements = new LinkedList(); @@ -278,7 +279,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager LayoutContext childLC = new LayoutContext(0); List childElements; LayoutManager currentChildLM; - if (lmStack != null) { + if (isRestart) { if (lmStack.isEmpty()) { assert restartAtLM != null && restartAtLM.getParent() == this; currentChildLM = restartAtLM; @@ -342,7 +343,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager } while ((currentChildLM = getChildLM()) != null) { - if (lmStack != null) { + if (isRestart) { currentChildLM.reset(); // TODO won't work with forced breaks } -- 2.39.5