Page 1 of 1

Unclosed InputStreams in org.docx4j.jaxb.Context

PostPosted: Thu Oct 16, 2014 8:22 pm
by grt
The method org.docx4j.jaxb.Context.searchManifestsForJAXBImplementationInfo opens InputStreams in a while loop, but never closes them. See https://github.com/plutext/docx4j/blob/master/src/main/java/org/docx4j/jaxb/Context.java#L205. I believe they should be closed after use to prevent wasting resources.

I found this when using docx4j to load a document, which leads to the code seen above opening several streams per call and corresponding warnings from glassfish upon finalization. The issue should be apparant from a static point of view though.

Re: Unclosed InputStreams in org.docx4j.jaxb.Context

PostPosted: Thu Oct 16, 2014 10:50 pm
by jason