From: Andreas L. Delmelle Date: Fri, 8 May 2015 18:52:41 +0000 (+0000) Subject: [Test commit rights] Move otherwise unreachable null check X-Git-Tag: fop-2_0~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e1a9121307f5795cd91e04bc82a226e5235b379e;p=xmlgraphics-fop.git [Test commit rights] Move otherwise unreachable null check git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1678425 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java b/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java index 8830278b4..b687689bc 100644 --- a/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java @@ -63,6 +63,9 @@ public abstract class AbstractBaseLayoutManager * @param fo the formatting object for this layout manager */ public AbstractBaseLayoutManager(FObj fo) { + if (fo == null) { + throw new IllegalStateException("Null formatting object found."); + } this.fobj = fo; setGeneratesReferenceArea(fo.generatesReferenceAreas()); } diff --git a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java index 5eac70548..3a73b233b 100644 --- a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java @@ -82,9 +82,6 @@ public abstract class AbstractLayoutManager extends AbstractBaseLayoutManager im */ public AbstractLayoutManager(FObj fo) { super(fo); - if (fo == null) { - throw new IllegalStateException("Null formatting object found."); - } markers = fo.getMarkers(); fobjIter = fo.getChildNodes(); childLMiter = new LMiter(this);