Bug 60259 - [PATCH] dispose temp file in test code
Summary: [PATCH] dispose temp file in test code
Alias: None
Product: POI
Classification: Unclassified
Component: SXSSF (show other bugs)
Version: 3.15-FINAL
Hardware: PC Mac OS X 10.1
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2016-10-15 09:43 UTC by PJ Fanning
Modified: 2016-10-15 19:08 UTC (History)
0 users

[PATCH] dispose temp file in test code (758 bytes, text/plain)
2016-10-15 09:43 UTC, PJ Fanning

Note You need to log in before you can comment on or make changes to this bug.
Description PJ Fanning 2016-10-15 09:43:03 UTC
Created attachment 34375 [details]
[PATCH] dispose temp file in test code

A small issue in TestSXSSFWorkbookWithCustomZipEntrySource. As the inner classes in the test could be used as the basis of writing a custom version of SXSSFWorkbook, it would be nice to ensure that those classes close all the temp resources they create.
Comment 1 Dominik Stadler 2016-10-15 17:49:09 UTC
Thanks for the patch, we already fixed this via r1765019, albeit in a different way, maybe you can take a look if our approach is valid as well.
Comment 2 Dominik Stadler 2016-10-15 17:50:33 UTC
Oh wait, I will take another look, maybe this is something else.
Comment 3 Dominik Stadler 2016-10-15 19:08:36 UTC
Thanks, I have applied this via r1765100, although the file was cleaned up by the TempFile implementation automatically as well and thus no file was left over, but it is a bit cleaner this way.