diff options
author | PJ Fanning <fanningpj@apache.org> | 2024-04-19 10:12:44 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2024-04-19 10:12:44 +0000 |
commit | a0091652a5810adb6f3e19f339ccec5feeaa2cac (patch) | |
tree | 91cc18ca3ef82e3b816956ead8aad4a3ea1ccdb1 /poi-ooxml/src | |
parent | 1899bee1b9b69ae184386fff72cb11aa123b78d8 (diff) | |
download | poi-a0091652a5810adb6f3e19f339ccec5feeaa2cac.tar.gz poi-a0091652a5810adb6f3e19f339ccec5feeaa2cac.zip |
fix npe
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917138 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml/src')
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java index 82cf69b32d..6d04232947 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java @@ -165,7 +165,9 @@ public final class PackagingURIHelper { if (partUri == null) throw new IllegalArgumentException("partUri"); - return partUri.getPath().matches( + final String path = partUri.getPath(); + + return path != null && path.matches( ".*" + RELATIONSHIP_PART_SEGMENT_NAME + ".*" + RELATIONSHIP_PART_EXTENSION_NAME + "$"); } |