]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
master is not supposed to still be null when canProcess is called
authorVincent Hennebert <vhennebert@apache.org>
Tue, 31 Jan 2012 14:56:55 +0000 (14:56 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Tue, 31 Jan 2012 14:56:55 +0000 (14:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1238642 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java
src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java

index 63af7e5c04bb9e2b6901510f1a068df11751b135..710bb4f1705af760cc53a02944be154df28ffe4d 100644 (file)
@@ -172,12 +172,8 @@ public class RepeatablePageMasterReference extends FObj
 
     /** {@inheritDoc} */
     public boolean canProcess(String flowName) {
-        if (master != null) {
-            return master.getRegion(FO_REGION_BODY).getRegionName().equals(flowName);
-        }
-        else {
-            return false;
-        }
+        assert master != null;
+        return master.getRegion(FO_REGION_BODY).getRegionName().equals(flowName);
     }
 
     /** {@inheritDoc} */
index 2fa664336a5f54e9e66eacf64379da1eee93587c..99fc5b21678058fa1002002128ddce03dbeccda4 100644 (file)
@@ -150,12 +150,8 @@ public class SinglePageMasterReference extends FObj
 
     /** {@inheritDoc} */
     public boolean canProcess(String flowName) {
-        if (master != null) {
-            return master.getRegion(FO_REGION_BODY).getRegionName().equals(flowName);
-        }
-        else {
-            return false;
-        }
+        assert master != null;
+        return master.getRegion(FO_REGION_BODY).getRegionName().equals(flowName);
     }
 
     /** {@inheritDoc} */