-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Duplicate
-
Affects Version/s: 7.10, 8.3
-
Fix Version/s: None
-
Component/s: Web Common
-
Tags:
-
Backlog priority:700
-
Sprint:nxSL Sprint 8.4.4, nxSL Sprint 8.4.5, nxSL Sprint 8.10.1, nxSL Sprint 8.10.2, nxSL Sprint 9.1.1
-
Story Points:5
When exporting the worklist as a ZIP, if any issue happens while building the ZIP file, the temporary file won't be deleted before the server is restarted. This can lead to a full filesystem if ZIP files are big.
In DocumentListZipExporter.exportWorklistAsZip the temp file will be deleted when the VM terminates:
tmpFile.deleteOnExit();
Several problems appear below this, in the following code:
try { out.close(); fout.close(); } catch (ZipException e) { return null; } return tmpFile;
- there should be a finally statement testing if the returned value will be null, if it is the case then tmpFile should be deleted immediately
- fout is a FileOutputStream and close() method raises IOException not ZipException
- out is a ZipOutputStream and close() method can raise IOException as well as ZipException
- both exception types should be handled and a error message should be added to the logs containing the ZIP filename
- depends on
-
NXP-21079 temporary blob download URLs should always be available on all cluster nodes
- Resolved