This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git
The following commit(s) were added to refs/heads/trunk by this push:
new 027927bfad [bz-69897] Fix null check for LineDash properties (#964)
027927bfad is described below
commit 027927bfade4e099156a9f98648476716d6c530e
Author: PJ Fanning <[email protected]>
AuthorDate: Mon Dec 8 15:47:50 2025 +0100
[bz-69897] Fix null check for LineDash properties (#964)
---
.../src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java
b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java
index 4d3c78b933..6a1c6bb4ce 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java
@@ -535,7 +535,7 @@ public abstract class XSLFSimpleShape extends XSLFShape
@Override
public boolean fetch(XSLFShape shape) {
CTLineProperties ln = getLn(shape, false);
- if (ln == null || !ln.isSetPrstDash()) {
+ if (ln == null || !ln.isSetPrstDash() ||
ln.getPrstDash().getVal() == null) {
return false;
}
@@ -548,7 +548,7 @@ public abstract class XSLFSimpleShape extends XSLFShape
LineDash dash = fetcher.getValue();
if (dash == null) {
CTLineProperties defaultLn = getDefaultLineProperties();
- if (defaultLn != null && defaultLn.isSetPrstDash()) {
+ if (defaultLn != null && defaultLn.isSetPrstDash() &&
defaultLn.getPrstDash().getVal() != null) {
dash =
LineDash.fromOoxmlId(defaultLn.getPrstDash().getVal().intValue());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]