From 59091db138d2fc51f75918f907adc7f04a75a226 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sun, 7 Aug 2022 22:44:56 +0000 Subject: [PATCH] don't wrap exceptions git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903274 13f79535-47bb-0310-9956-ffa450edef68 --- .../usermodel/chart/XDDFBubbleChartData.java | 32 +++++++------------ 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFBubbleChartData.java b/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFBubbleChartData.java index a55ae5e36b..a08eeb2b93 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFBubbleChartData.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFBubbleChartData.java @@ -106,18 +106,14 @@ public class XDDFBubbleChartData extends XDDFChartData { public XDDFChartData.Series addSeries(XDDFDataSource category, XDDFNumericalDataSource values) { final long index = this.parent.incrementSeriesCount(); - try { - final CTBubbleSer ctSer = this.chart.addNewSer(); - ctSer.addNewXVal(); - ctSer.addNewYVal(); - ctSer.addNewIdx().setVal(index); - ctSer.addNewOrder().setVal(index); - final Series added = new Series(ctSer, category, values); - this.series.add(added); - return added; - } catch (Exception ex) { - throw new RuntimeException(ex); - } + final CTBubbleSer ctSer = this.chart.addNewSer(); + ctSer.addNewXVal(); + ctSer.addNewYVal(); + ctSer.addNewIdx().setVal(index); + ctSer.addNewOrder().setVal(index); + final Series added = new Series(ctSer, category, values); + this.series.add(added); + return added; } public class Series extends XDDFChartData.Series { @@ -141,14 +137,10 @@ public class XDDFBubbleChartData extends XDDFChartData { } public void setBubbleSizes(XDDFNumericalDataSource values) { - try { - if (series.isSetBubbleSize()) series.unsetBubbleSize(); - CTNumDataSource bubbleSizes = series.addNewBubbleSize(); - CTNumData cache = retrieveNumCache(bubbleSizes, values); - values.fillNumericalCache(cache); - } catch (Exception ex) { - throw new RuntimeException(ex); - } + if (series.isSetBubbleSize()) series.unsetBubbleSize(); + CTNumDataSource bubbleSizes = series.addNewBubbleSize(); + CTNumData cache = retrieveNumCache(bubbleSizes, values); + values.fillNumericalCache(cache); } @Override -- 2.39.5