]> source.dussan.org Git - poi.git/commitdiff
try to fix issue with missing classes in poi-ooxml-schemas
authorPJ Fanning <fanningpj@apache.org>
Sat, 4 Jul 2020 23:02:18 +0000 (23:02 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sat, 4 Jul 2020 23:02:18 +0000 (23:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879507 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xddf/usermodel/chart/XDDFErrorBars.java
src/ooxml/testcases/org/apache/poi/xddf/usermodel/TestNecessaryOOXMLClasses.java

index 807afc080a536bb40ce14b375caf6da1aff9dbac..108793d0ce99437019f5195a68bd7391782094aa 100644 (file)
@@ -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) {
index 225aaece6c30927c7707823cdc03228dc36d517f..e6b1589b58061e1393564e7147ad0fce709900eb 100644 (file)
@@ -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");