Steps to notice the descriptor increase:
1) Start an wiki instance with some document containing more than one attachements
2) On a terminal, monitor opened attachement-cache files with the following command line
3) Look at the attachments of a document with more than one attachment, and open one of them
4) notice an increase of the opened descriptor by the number of attachment in the document, followed by a decrease of only one.
I suspect the getNewFileItem() function called by the no-args constructor to be opening output streams that only get closed if some date goes in, which is not true, since setting the attachment content seems to create another FileItem.
It does not seems to affect server using FS attachments.