aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-07-15 21:06:30 +0000
committerPJ Fanning <fanningpj@apache.org>2022-07-15 21:06:30 +0000
commit2c479b4967b22b877a86f9bd6ec4ef5c4f85510f (patch)
treea31e63aadd0ca25c74e7b65bc348ce7dffeede53
parent619db4dde52480406269ae526c69ed87f1103462 (diff)
downloadpoi-2c479b4967b22b877a86f9bd6ec4ef5c4f85510f.tar.gz
poi-2c479b4967b22b877a86f9bd6ec4ef5c4f85510f.zip
[github-347] make some inner classes static to save memory. Thanks to XenoAmess. This closes #347
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902749 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java2
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xssf/eventusermodel/TestXSSFBReader.java2
-rw-r--r--poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFChart.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java b/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java
index a88c0e50ec..4669e2e707 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java
@@ -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);
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/eventusermodel/TestXSSFBReader.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/eventusermodel/TestXSSFBReader.java
index 2d6e57e049..3fa96264f0 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/eventusermodel/TestXSSFBReader.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/eventusermodel/TestXSSFBReader.java
@@ -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) {
diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFChart.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFChart.java
index 38266f409d..c8e9aabd74 100644
--- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFChart.java
+++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFChart.java
@@ -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;
}