aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2020-01-03 11:24:12 +0000
committerPJ Fanning <fanningpj@apache.org>2020-01-03 11:24:12 +0000
commit4a7aee8b1fe32075792ef467d07e42cd950035ce (patch)
tree1a52c83d90c93053dd1edfa040bbf9bd8434dfec
parent8b389fdd4b538a3656396b6d57f3a7a02fbcfeab (diff)
downloadpoi-4a7aee8b1fe32075792ef467d07e42cd950035ce.tar.gz
poi-4a7aee8b1fe32075792ef467d07e42cd950035ce.zip
remove unnecessary close
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872283 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java b/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java
index c329025d14..d329d44a3f 100644
--- a/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java
+++ b/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java
@@ -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 );
- }
- }
-
}