Description
FileSystemResource does not appear to close the InputStream that it creates.
I believe it should call setClose(true) on the PartWriterCallback.
To verify the problem, see the attached quick start. Change the filename in HomePage.java to point to some valid image file on your system. After viewing the home page in a browser, check for files that the jetty process has open, eg:
lsof -p PID | grep logo
If you load the home page a few more times, using Shift-reload to avoid simply loading from cache, you can see many file descriptors pointing to the image file are kept open:
java 87278 borisgoldowsky txt REG 1,4 12244 103583676 /Users/borisgoldowsky/idea/frquickstart/src/main/webapp/logo.png java 87278 borisgoldowsky 175r REG 1,4 12244 103583676 /Users/borisgoldowsky/idea/frquickstart/src/main/webapp/logo.png java 87278 borisgoldowsky 180r REG 1,4 12244 103583676 /Users/borisgoldowsky/idea/frquickstart/src/main/webapp/logo.png java 87278 borisgoldowsky 181r REG 1,4 12244 103583676 /Users/borisgoldowsky/idea/frquickstart/src/main/webapp/logo.png