diff options
author | PJ Fanning <pjfanning@users.noreply.github.com> | 2025-07-11 19:50:51 +0100 |
---|---|---|
committer | PJ Fanning <pjfanning@users.noreply.github.com> | 2025-07-11 19:50:51 +0100 |
commit | 1eee67fb8b3ef6c881f8444cfbea5ecc203be741 (patch) | |
tree | a0b2b0300ecb200a34c1ce4e8f921293dd0a64b9 | |
parent | fa9428511acc4c1a0a4c2bbc6da1645abd49b424 (diff) | |
download | poi-1eee67fb8b3ef6c881f8444cfbea5ecc203be741.tar.gz poi-1eee67fb8b3ef6c881f8444cfbea5ecc203be741.zip |
sxssf workbook dispose no longer needed
-rw-r--r-- | poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/DeferredGeneration.java | 11 | ||||
-rw-r--r-- | poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/Outlining.java | 7 |
2 files changed, 10 insertions, 8 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/DeferredGeneration.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/DeferredGeneration.java index 1b98bb26ab..de66e11554 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/DeferredGeneration.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/DeferredGeneration.java @@ -53,12 +53,13 @@ public class DeferredGeneration { try (FileOutputStream fileOut = new FileOutputStream("DeferredGeneration.xlsx")) { wb.write(fileOut); - //writeAvoidingTempFiles was added as an experimental change in POI 5.1.0 - //wb.writeAvoidingTempFiles(fileOut); - } finally { - //the dispose call is necessary to ensure temp files are removed - wb.dispose(); + // writeAvoidingTempFiles was added as an experimental change in POI 5.1.0 + // wb.writeAvoidingTempFiles(fileOut); } + // finally { + // the dispose call is no longer necessary to ensure temp files are removed + // wb.dispose(); + // } System.out.println("wrote DeferredGeneration.xlsx"); } } diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/Outlining.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/Outlining.java index 31b15dcb16..9258790da3 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/Outlining.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/Outlining.java @@ -46,10 +46,11 @@ public class Outlining { try (FileOutputStream fileOut = new FileOutputStream("outlining_collapsed.xlsx")) { wb2.write(fileOut); - } finally { - //the dispose call is necessary to ensure temp files are removed - wb2.dispose(); } + // finally { + // the dispose call is no longer necessary to ensure temp files are removed + // wb2.dispose(); + // } } } } |