From 49c7697650720db1bd8afa88046b6cecd7206f00 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Tue, 31 Jan 2012 14:56:55 +0000 Subject: [PATCH] master is not supposed to still be null when canProcess is called git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1238642 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/fo/pagination/RepeatablePageMasterReference.java | 8 ++------ .../fop/fo/pagination/SinglePageMasterReference.java | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java index 63af7e5c0..710bb4f17 100644 --- a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java +++ b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java @@ -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} */ diff --git a/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java b/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java index 2fa664336..99fc5b216 100644 --- a/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java +++ b/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java @@ -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} */ -- 2.39.5