From e1a9121307f5795cd91e04bc82a226e5235b379e Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Fri, 8 May 2015 18:52:41 +0000 Subject: [PATCH] [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 --- .../org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java | 3 +++ src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) 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); -- 2.39.5