diff options
author | PJ Fanning <fanningpj@apache.org> | 2020-07-04 23:02:18 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2020-07-04 23:02:18 +0000 |
commit | 1c5ba18ac099cdee10d2f5a704a5ba8ad760bf28 (patch) | |
tree | 754bc9c078182a530b47dc95f5ffb783c0101496 /src | |
parent | 2de45b8c1c502c25ee2947d3c6baaea9fa827b9b (diff) | |
download | poi-1c5ba18ac099cdee10d2f5a704a5ba8ad760bf28.tar.gz poi-1c5ba18ac099cdee10d2f5a704a5ba8ad760bf28.zip |
try to fix issue with missing classes in poi-ooxml-schemas
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879507 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFErrorBars.java | 4 | ||||
-rw-r--r-- | src/ooxml/testcases/org/apache/poi/xddf/usermodel/TestNecessaryOOXMLClasses.java | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFErrorBars.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFErrorBars.java index 807afc080a..108793d0ce 100644 --- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFErrorBars.java +++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFErrorBars.java @@ -88,7 +88,7 @@ public class XDDFErrorBars { } public ErrorBarType getErrorBarType() { - return ErrorBarType.valueOf(bars.getErrBarType().getVal()); + return bars.getErrBarType() == null ? null : ErrorBarType.valueOf(bars.getErrBarType().getVal()); } public void setErrorBarType(ErrorBarType barType) { @@ -96,7 +96,7 @@ public class XDDFErrorBars { } public ErrorValueType getErrorValueType() { - return ErrorValueType.valueOf(bars.getErrValType().getVal()); + return bars.getErrValType() == null ? null : ErrorValueType.valueOf(bars.getErrValType().getVal()); } public void setErrorValueType(ErrorValueType valueType) { diff --git a/src/ooxml/testcases/org/apache/poi/xddf/usermodel/TestNecessaryOOXMLClasses.java b/src/ooxml/testcases/org/apache/poi/xddf/usermodel/TestNecessaryOOXMLClasses.java index 225aaece6c..e6b1589b58 100644 --- a/src/ooxml/testcases/org/apache/poi/xddf/usermodel/TestNecessaryOOXMLClasses.java +++ b/src/ooxml/testcases/org/apache/poi/xddf/usermodel/TestNecessaryOOXMLClasses.java @@ -166,7 +166,11 @@ public class TestNecessaryOOXMLClasses { Assert.assertNotNull(ErrorBarType.BOTH); Assert.assertNotNull(ErrorValueType.CUSTOM); Assert.assertNotNull(ErrorDirection.X); - Assert.assertNotNull(new XDDFErrorBars()); + XDDFErrorBars xeb = new XDDFErrorBars(); + Assert.assertNotNull(xeb); + Assert.assertNull(xeb.getErrorBarType()); + Assert.assertNull(xeb.getErrorDirection()); + Assert.assertNull(xeb.getErrorValueType()); STErrBarType.Enum e9 = STErrBarType.Enum.forString("both"); Assert.assertNotNull(e9); STErrValType.Enum e10 = STErrValType.Enum.forString("percentage"); |