]> source.dussan.org Git - poi.git/commitdiff
don't wrap exceptions
authorPJ Fanning <fanningpj@apache.org>
Sun, 7 Aug 2022 22:44:56 +0000 (22:44 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sun, 7 Aug 2022 22:44:56 +0000 (22:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903274 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFBubbleChartData.java

index a55ae5e36bc923b3691bfb170b8f7a91d87154bd..a08eeb2b933a0667f96e0c09da2d222f1fd49c5b 100644 (file)
@@ -106,18 +106,14 @@ public class XDDFBubbleChartData extends XDDFChartData {
     public XDDFChartData.Series addSeries(XDDFDataSource<?> category,
                                           XDDFNumericalDataSource<? extends Number> 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