From e43ab85691f6ad606038ed9269c2064880b3be84 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Sat, 28 Feb 2015 17:36:19 +0000 Subject: [PATCH] Ensure that the core properties are there before saving them, in case they have not yet been lazy-created git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1662971 13f79535-47bb-0310-9956-ffa450edef68 --- src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java index 62f26b7546..888f501302 100644 --- a/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java +++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java @@ -443,7 +443,9 @@ public final class ZipPackage extends Package { if (this.getPartsByRelationshipType(PackageRelationshipTypes.CORE_PROPERTIES).size() == 0 && this.getPartsByRelationshipType(PackageRelationshipTypes.CORE_PROPERTIES_ECMA376).size() == 0 ) { logger.log(POILogger.DEBUG,"Save core properties part"); - + + // Ensure that core properties are added if missing + getPackageProperties(); // Add core properties to part list ... addPackagePart(this.packageProperties); // ... and to add its relationship ... -- 2.39.5