]> source.dussan.org Git - poi.git/commitdiff
[github-347] make some inner classes static to save memory. Thanks to XenoAmess....
authorPJ Fanning <fanningpj@apache.org>
Fri, 15 Jul 2022 21:06:30 +0000 (21:06 +0000)
committerPJ Fanning <fanningpj@apache.org>
Fri, 15 Jul 2022 21:06:30 +0000 (21:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902749 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java
poi-ooxml/src/test/java/org/apache/poi/xssf/eventusermodel/TestXSSFBReader.java
poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFChart.java

index a88c0e50ec8cfd7fbd6cac8ff651c894d63a4ab2..4669e2e70753cc591aebadb73af2716d0f78aa55 100644 (file)
@@ -142,7 +142,7 @@ public abstract class XDDFChartData {
     public abstract XDDFChartData.Series addSeries(XDDFDataSource<?> category,
             XDDFNumericalDataSource<? extends Number> values);
 
-    public abstract class Series {
+    public abstract static class Series {
         protected abstract CTSerTx getSeriesText();
 
         public abstract void setShowLeaderLines(boolean showLeaderLines);
index 2d6e57e049e11d15fea9f34714eeb65a2fcb2857..3fa96264f0dc6c51ea8c1b4414952fb1bc079f85 100644 (file)
@@ -165,7 +165,7 @@ class TestXSSFBReader {
     }
 
 
-    private class TestSheetHandler implements XSSFSheetXMLHandler.SheetContentsHandler {
+    private static class TestSheetHandler implements XSSFSheetXMLHandler.SheetContentsHandler {
         private final StringBuilder sb = new StringBuilder();
 
         void startSheet(String sheetName) {
index 38266f409d885fa071fbb781f3a483597845e4ba..c8e9aabd74c12ed36fb8b88fd61f297eb0e6618a 100644 (file)
@@ -1120,7 +1120,7 @@ public final class HSSFChart {
                 }
             }
 
-            linkedDataRecord.setFormulaOfLink(ptgList.toArray(new Ptg[0]));
+            linkedDataRecord.setFormulaOfLink(ptgList.toArray(Ptg.EMPTY_PTG_ARRAY));
 
             return rowCount * colCount;
         }