From: Nick Burch Date: Sat, 28 Feb 2015 17:36:19 +0000 (+0000) Subject: Ensure that the core properties are there before saving them, in case they have not... X-Git-Tag: REL_3_12_FINAL~97 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e43ab85691f6ad606038ed9269c2064880b3be84;p=poi.git 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 --- 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 ...