diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-11-02 14:50:47 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-11-02 14:50:47 +0000 |
commit | f3d36d52717a45ebe7840725cc45d0db1db35f51 (patch) | |
tree | 008e29d82a6e9108c27d657336419725747f10d8 /poi-examples/src | |
parent | 8bf6a489f677236238eb525e7a191a59ae9a4ac9 (diff) | |
download | poi-f3d36d52717a45ebe7840725cc45d0db1db35f51.tar.gz poi-f3d36d52717a45ebe7840725cc45d0db1db35f51.zip |
use package revert due to new warning log about using revert
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894687 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples/src')
-rw-r--r-- | poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java index d2021e2c19..272a71a411 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/XLSX2CSV.java @@ -255,9 +255,12 @@ public class XLSX2CSV { minColumns = Integer.parseInt(args[1]); // The package open is instantaneous, as it should be. - try (OPCPackage p = OPCPackage.open(xlsxFile.getPath(), PackageAccess.READ)) { + OPCPackage p = OPCPackage.open(xlsxFile.getPath(), PackageAccess.READ) + try { XLSX2CSV xlsx2csv = new XLSX2CSV(p, System.out, minColumns); xlsx2csv.process(); + } finally { + p.revert(); } } } |