]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
[Test commit rights] Move otherwise unreachable null check
authorAndreas L. Delmelle <adelmelle@apache.org>
Fri, 8 May 2015 18:52:41 +0000 (18:52 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Fri, 8 May 2015 18:52:41 +0000 (18:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1678425 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java
src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java

index 8830278b4ba3c6ed825a034ec3e80a163fdc232f..b687689bcbc3e8efc54dac12538846d9536ffa20 100644 (file)
@@ -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());
     }
index 5eac70548e0ea3e754ed79b00c0526c9402f8bb0..3a73b233b233e70720dc72820f305d70b2b9f89f 100644 (file)
@@ -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);