From 311236e507cc5417e4db524b1faed7865ab17617 Mon Sep 17 00:00:00 2001 From: Chris Bowditch Date: Wed, 18 Jan 2012 14:32:43 +0000 Subject: [PATCH] resolve findbug warnings git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1232905 13f79535-47bb-0310-9956-ffa450edef68 --- findbugs-exclude.xml | 15 +++++++++++++++ .../pagination/RepeatablePageMasterReference.java | 7 ++++++- .../fo/pagination/SinglePageMasterReference.java | 7 ++++++- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/findbugs-exclude.xml b/findbugs-exclude.xml index 67220fc1e..de2eded20 100644 --- a/findbugs-exclude.xml +++ b/findbugs-exclude.xml @@ -2506,6 +2506,16 @@ + + + + + + + + + + @@ -3545,6 +3555,11 @@ + + + + + diff --git a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java index 83207885a..63af7e5c0 100644 --- a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java +++ b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java @@ -172,7 +172,12 @@ public class RepeatablePageMasterReference extends FObj /** {@inheritDoc} */ public boolean canProcess(String flowName) { - return master.getRegion(FO_REGION_BODY).getRegionName().equals(flowName); + if (master != null) { + return master.getRegion(FO_REGION_BODY).getRegionName().equals(flowName); + } + else { + return false; + } } /** {@inheritDoc} */ diff --git a/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java b/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java index a39949347..2fa664336 100644 --- a/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java +++ b/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java @@ -150,7 +150,12 @@ public class SinglePageMasterReference extends FObj /** {@inheritDoc} */ public boolean canProcess(String flowName) { - return master.getRegion(FO_REGION_BODY).getRegionName().equals(flowName); + if (master != null) { + return master.getRegion(FO_REGION_BODY).getRegionName().equals(flowName); + } + else { + return false; + } } /** {@inheritDoc} */ -- 2.39.5