]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Moved to an IllegalArgumentException for getRegionViewport.
authorGlen Mazza <gmazza@apache.org>
Wed, 10 Nov 2004 11:13:34 +0000 (11:13 +0000)
committerGlen Mazza <gmazza@apache.org>
Wed, 10 Nov 2004 11:13:34 +0000 (11:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198136 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/area/Page.java
src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java

index 609925552df05f4217bd01c3480cf6a79c37f5e8..4eca122e2ffcea3a13645ccd1a3f71ed0ce8ccb3 100644 (file)
@@ -83,7 +83,8 @@ public class Page implements Serializable, Cloneable {
         } else if (areaclass == Constants.FO_REGION_AFTER) {
             return regionAfter;
         }
-        return null;
+        throw new IllegalArgumentException("No such area class with ID = "
+            + areaclass);
     }
 
     /**
index 1569990f31258a6e9f4a567589859f60ef8faa1a..1c41a954a6cac65061635ad4020497560f83ba45 100644 (file)
@@ -494,9 +494,6 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager implements
         }
         
         RegionViewport reg = curPage.getPage().getRegionViewport(region.getNameId());
-        if (reg == null) {
-            log.error("no region viewport: shouldn't happen");
-        }
         StaticContentLayoutManager lm = getStaticContentLayoutManager(flow);
         lm.initialize();
         lm.setRegionReference(reg.getRegion());