diff options
Diffstat (limited to 'src/ooxml/java/org/apache')
-rw-r--r-- | src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientFillProperties.java | 2 | ||||
-rw-r--r-- | src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientFillProperties.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientFillProperties.java index c46a58bb29..ab05448eec 100644 --- a/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientFillProperties.java +++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/XDDFGradientFillProperties.java @@ -112,7 +112,7 @@ public class XDDFGradientFillProperties implements XDDFFillProperties { .getGsLst() .getGsList() .stream() - .map(gs -> new XDDFGradientStop(gs)) + .map(XDDFGradientStop::new) .collect(Collectors.toList())); } else { return Collections.emptyList(); diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java index a11b62abb3..3df55edbaa 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java @@ -431,7 +431,8 @@ public abstract class XSLFShape implements Shape<XSLFShape,XSLFTextParagraph> { protected static PaintStyle selectPaint(final CTGradientFillProperties gradFill, CTSchemeColor phClr, final XSLFTheme theme) { @SuppressWarnings("deprecation") - final CTGradientStop[] gs = gradFill.getGsLst().getGsArray(); + final CTGradientStop[] gs = gradFill.getGsLst() == null ? + new CTGradientStop[0] : gradFill.getGsLst().getGsArray(); Arrays.sort(gs, (o1, o2) -> { int pos1 = o1.getPos(); |