When using Jimi library to handle images, the code that does this open the stream to the image file using (url.getStream()) but did not close it. This prevent the deletion on the image files. This doesn't have much impact on on-off application but it creates a lot of troubles in the long-standing web application. I have confirmed this by trying modifying the source code (JimiImage.loadImage ()) to close the stream and it worked.
This is also true for JpegImage.java and JAIImage.java.
I changed this to critical because in a server application, this constantly results in OutOfMemory excpetions after some time. And the only solution is to exit the application (JVM) and restart it again. So far, we have to exit our application every morning and restart it again ... :-( I noticed this as some temporary image files used for FOP transformation can't be deleted after the processing (and freeing up all possible objects).
yup, it would be great to introduce a InputStream inputStream = null; try { inputStream = ... ... } finally { if (inputStream != null) try { inputStream.close();} catch (IOException ioe) { /* ignore or anything else */ } }
Patch available as bug #34308 *** This bug has been marked as a duplicate of 34308 ***
batch transition to closed remaining pre-FOP1.0 resolved bugs