You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2025/12/08 14:34:15 UTC

(poi) branch pjfanning-patch-1 created (now 9fd27d2744)

This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a change to branch pjfanning-patch-1
in repository https://gitbox.apache.org/repos/asf/poi.git


      at 9fd27d2744 [bz-69897] Fix null check for LineDash properties

This branch includes the following new commits:

     new 9fd27d2744 [bz-69897] Fix null check for LineDash properties

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


(poi) 01/01: [bz-69897] Fix null check for LineDash properties

Posted by fa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch pjfanning-patch-1
in repository https://gitbox.apache.org/repos/asf/poi.git

commit 9fd27d2744904c8bbdcf0a82fac79cc1ae23fd16
Author: PJ Fanning <pj...@users.noreply.github.com>
AuthorDate: Mon Dec 8 15:34:07 2025 +0100

    [bz-69897] Fix null check for LineDash properties
---
 .../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: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org