I'm reverting the change in the handling of the 404 error.
It appears this is the correct behaviour, although it
is documented here:

http://java.sun.com/j2se/1.5.0/docs/api/java/net/HttpURLConnection.html#getErrorStream()

rather than as part of the connect() method.

Changelog:

2005-05-26  Andrew John Hughes  <[EMAIL PROTECTED]>

        * gnu/java/net/protocol/http/HTTPURLConnection.java:
        (connect()): Reverted the removal of the exception
        with 404s.

-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

No software patents in Europe -- http://nosoftwarepatents.com

"Value your freedom, or you will lose it, teaches history. 
`Don't bother us with politics' respond those who don't want to learn." 
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: gnu/java/net/protocol/http/HTTPURLConnection.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/java/net/protocol/http/HTTPURLConnection.java,v
retrieving revision 1.9
diff -u -3 -p -u -r1.9 HTTPURLConnection.java
--- gnu/java/net/protocol/http/HTTPURLConnection.java   26 May 2005 16:53:36 
-0000      1.9
+++ gnu/java/net/protocol/http/HTTPURLConnection.java   26 May 2005 20:54:03 
-0000
@@ -308,7 +308,10 @@ public class HTTPURLConnection
           {
             responseSink = new ByteArrayInputStream(reader.toByteArray ());
             if (response.getCode() == 404)
-             errorSink = responseSink;
+             {
+               errorSink = responseSink;
+               throw new FileNotFoundException(url.toString());
+             }
           }
       }
     while (retry);

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to