diff options
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagePartName.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagePartName.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagePartName.java index 43853dd3b7..14a1ee56cc 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagePartName.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagePartName.java @@ -139,7 +139,8 @@ public final class PackagePartName implements Comparable<PackagePartName> { throw new IllegalArgumentException("partUri"); } - return partUri.getPath().matches( + final String uriPath = partUri.getPath(); + return uriPath != null && uriPath.matches( "^.*/" + PackagingURIHelper.RELATIONSHIP_PART_SEGMENT_NAME + "/.*\\" + PackagingURIHelper.RELATIONSHIP_PART_EXTENSION_NAME + "$"); |