Patch to file/Connection.java

Per Bothner per@bothner.com
Wed Feb 20 13:11:00 GMT 2002


This brings opening of file URLs closer to JDK behavior.

The immediate problem was that the FileNotFoundException
did not include the filename in the message.  I noticed
from a JDK exception stack trace that JDK was opening
the InputStream in connect.  The suggested that getInputStream
should not open a stream, but return an already-opened one.
A test program verified that call getInputStream twice
would return the identical InputStream each time.

As a side-effect we get more consistent FileNotFoundExceptions.

I will check this in unless someone complains loadly and quickly enough.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: connect.patch
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20020220/03dad910/attachment.ksh>


More information about the Java-patches mailing list