Skip to content

Commit

Permalink
Close document always in SlideShowRecordDumper
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913795 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
centic9 committed Nov 15, 2023
1 parent 3b03ed5 commit 219954c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ public static void main(String[] args) throws IOException {

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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
});
Expand Down

0 comments on commit 219954c

Please sign in to comment.