Hi Max,

> ------- Additional Comments From [EMAIL PROTECTED]  2007-05-23 02:07 -------
> Created an attachment (id=20244)
>  --> (http://issues.apache.org/bugzilla/attachment.cgi?id=20244&action=view)
> Yet another try

I was about to hit return after having entered the svn commit command...
when I decided not to.

This isn't as simple as it seems to be. IIUC, with this change you will
end up with InputStreams which will /never/ be closed! I guess this will
lead to problems at some time...

In SVGReader, the input stream should be closed after the
createSVGDocument method has been called. Because if this method
terminates successfully, then the document actually is an SVG image and
the stream can be closed. Otherwise this method will throw an
IOException, and the following line won't be reached anyway.

In XMLReader we can't really do the same. This class will create a
generic DOM representing the input document, there is no reason why that
would fail. But IIUC you want to plug-in your own image reader instead
of relying on XMLReader? Which means that XMLReader shouldn't close the
stream. Or do it only if a converter is found for the corresponding
namespace? Probably that.

I'm not a specialist of the image handling area. Does all that make any
sense? Thoughts, opinions?


> There is still a lot of duplicated functionality in the Image Readers, which 
> at
> some point should be cleaned up.

You are welcome to work on this if you are willing to. Note that
Jeremias has been having some ideas about refactoring the image
handling, maybe you two will want to synchronize on this.

Thanks,
Vincent

Reply via email to