Browse Source

remove unnecessary close

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872283 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_4_1_2
PJ Fanning 4 years ago
parent
commit
4a7aee8b1f
1 changed files with 0 additions and 16 deletions
  1. 0
    16
      src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java

+ 0
- 16
src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java View File

@@ -767,7 +767,6 @@ public class POIXMLDocumentPart {
if (coreRel != null) {
PackagePart pp = pkg.getPart(coreRel);
if (pp == null) {
closeQuietly(pp);
throw new POIXMLException("OOXML file structure broken/invalid - core document '" + coreRel.getTargetURI() + "' not found.");
}
return pp;
@@ -781,19 +780,4 @@ public class POIXMLDocumentPart {

throw new POIXMLException("OOXML file structure broken/invalid - no core document found!");
}

private static void closeQuietly(final PackagePart closeable) {
// no need to log a NullPointerException here
if(closeable == null) {
return;
}

try {
closeable.close();
} catch ( Exception exc ) {
logger.log( POILogger.ERROR, "Unable to close resource: " + exc,
exc );
}
}

}

Loading…
Cancel
Save