cuba-platform / cuba

CUBA Platform is a high level framework for enterprise applications development
https://www.cuba-platform.com
Apache License 2.0
1.34k stars 219 forks source link

Temporary file not deleted after stream was closed #3260

Closed n-13 closed 2 years ago

n-13 commented 2 years ago

https://github.com/cuba-platform/cuba/blob/b56d4a98a13f5657c589d59ccbc435509dc119e3/modules/gui/src/com/haulmont/cuba/gui/export/ByteArrayDataProvider.java#L78

It can be done in this way for example:

return new FileInputStream(file) {
    @Override
    public void close() throws IOException {
        super.close();
        file.delete();
    }
};
n-13 commented 2 years ago

https://github.com/jmix-framework/jmix/issues/412