aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/java/org
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2018-09-27 21:22:24 +0000
committerPJ Fanning <fanningpj@apache.org>2018-09-27 21:22:24 +0000
commit0746b23fc4ef1bd88207a1c5df15cd70927c781d (patch)
treeda2318fb70ee8ac37943a18adc1b44551bfd7373 /src/ooxml/java/org
parent44e86832f299bde657135d148fe55af7aeb1cd45 (diff)
downloadpoi-0746b23fc4ef1bd88207a1c5df15cd70927c781d.tar.gz
poi-0746b23fc4ef1bd88207a1c5df15cd70927c781d.zip
make OPCPackage#close() unsynchronized and add javadoc note saying method is not thread-safe
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1842171 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java/org')
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
index 949ec69520..9625a86ff9 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
@@ -415,11 +415,13 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
* If your package is open read only, then you should call {@link #revert()}
* when finished with the package.
*
+ * This method is not thread-safe.
+ *
* @throws IOException
* If an IO exception occur during the saving process.
*/
@Override
- public synchronized void close() throws IOException {
+ public void close() throws IOException {
if (this.packageAccess == PackageAccess.READ) {
logger.log(POILogger.WARN,
"The close() method is intended to SAVE a package. This package is open in READ ONLY mode, use the revert() method instead !");