Skip to content

Commit

Permalink
dispose of temp-files when using StreamingXlsx in XlsxEmitter #1533 (#…
Browse files Browse the repository at this point in the history
…1535)

* dispose of temp-files when using StreamingXlsx in XlsxEmitter #1533

* revert back to old casting-mechanism
  • Loading branch information
aremund authored Jan 5, 2024
1 parent 3fdaf38 commit 7957703
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.net.URL;

import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.eclipse.birt.core.exception.BirtException;
import org.eclipse.birt.report.engine.api.IRenderOption;
import org.eclipse.birt.report.engine.content.IAutoTextContent;
Expand Down Expand Up @@ -342,6 +343,9 @@ public void end(IReportContent report) throws BirtException {
log.debug("ex:", ex.toString());
}
}
if (handlerState.getWb() instanceof SXSSFWorkbook) {
((SXSSFWorkbook) handlerState.getWb()).dispose();
}
handlerState = null;
reportOutputFilename = null;
reportOutputStream = null;
Expand Down

0 comments on commit 7957703

Please sign in to comment.