[bug-64879] SXSSFSheet dispose() fails to remove Temporary files for java.io.IOException: No space left on device

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1883170 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2020-11-07 09:26:12 +00:00
parent 9e5790d004
commit 90a9288bfc
8 changed files with 7 additions and 3 deletions

View File

@ -1908,10 +1908,14 @@ public class SXSSFSheet implements Sheet
* @return true if the file was deleted, false if it wasn't.
*/
boolean dispose() throws IOException {
if (!allFlushed) {
flushRows();
boolean ret;
try {
if (!allFlushed) {
flushRows();
}
} finally {
ret = _writer == null || _writer.dispose();
}
return _writer == null || _writer.dispose();
}
@Override