classpathx-xml
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Classpathx-xml] a patch to javax/xml/transform/stream/StreamSource.


From: David Brownell
Subject: Re: [Classpathx-xml] a patch to javax/xml/transform/stream/StreamSource.java
Date: Fri, 08 Feb 2002 10:57:02 -0800

> javax/xml/transform/stream/StreamResult.java says:
> 
> | public void setSystemId(File file) {
> |     try {
> | this.systemId = StreamSource.fileToURL (file).toString ();
> |     } catch (IOException e) {
> | // can't happen
> | throw new RuntimeException (e.getMessage ());
> |     }
> | }
> 
> But an IOException can happen when the file does not exist,
> which is usually a case when we try to make a new output
> file using Saxon XSLT processor.

Good point.  The fix is now in CVS, along with SAX 2.0.1
support, and a new release should be coming soon.

As I recall, that fileToURL() routine throws an IOException
when the file doesn't exist because some versions of the
JDK's URL code don't report that case sanely.  As used in
those javax.xml classes, that problem shouldn't exist.

- Dave





reply via email to

[Prev in Thread] Current Thread [Next in Thread]