xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Matuszczak" <l.matuszc...@atrem.pl>
Subject SVGImageElementBridge and closing url connections
Date Tue, 09 May 2006 11:29:17 GMT

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.

Lukasz Matuszczak 

To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

View raw message