Hello,

I've noticed a strange behaviour of batik considering URL Connections. I've made my own java protocol handler, and I can see that method getInputStream() of my ResourceURLConnection object is called, but the stream is never closed if it is used by SVGImageElementBridge.

I looked into createImageGraphicsNode os SVGImageElementBridge implementation and I think there is a bug there. The stream is wrapped in ProtectedStream object 'reference'. However reference.release() is called only if we get to the last "try ... finally" (image is raster and ImageTagRegistry is allowed to open URL). If the image is SVG the new GraphicsNode is returned and the 'reference' is not released.

I would like to know is it a bug or an expected behaviour? I think there are many places where external resources can be loaded into batik, so maybe there are other classes where similar bug can occur.

Regards,
Lukasz Matuszczak


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to