Close document always in SlideShowRecordDumper

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913795 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2023-11-15 10:22:49 +00:00
parent 3b03ed58e4
commit 219954c07c
2 changed files with 8 additions and 6 deletions

View File

@ -79,12 +79,12 @@ public final class SlideShowRecordDumper {
String filename = args[ndx];
SlideShowRecordDumper foo = new SlideShowRecordDumper(System.out,
filename, verbose, escher);
foo.printDump();
foo.doc.close();
SlideShowRecordDumper foo = new SlideShowRecordDumper(System.out, filename, verbose, escher);
try {
foo.printDump();
} finally {
foo.doc.close();
}
}
public static void printUsage() {

View File

@ -35,6 +35,8 @@ public class TestSlideShowRecordDumper extends BaseTestPPTIterating {
@Test
void testMain() throws IOException {
SlideShowRecordDumper.main(new String[] {});
SlideShowRecordDumper.main(new String[] {
HSLFTestDataSamples.getSampleFile("slide_master.ppt").getAbsolutePath(),
});