Patch: FYI: HTTPURLConnection fixlet

Tom Tromey tromey@redhat.com
Wed Jun 15 21:45:00 GMT 2005


I'm checking this in to libgcj and classpath.  When the 4.0 branch
opens again, I will put it there as well.

This is the patch from PR libgcj/21074.

Tom

Index: ChangeLog
from  Goffredo Baroncelli  <kreijack@inwind.it>

	* gnu/java/net/protocol/http/HTTPURLConnection.java
	(getHeaderFieldKey): Check index.

Index: gnu/java/net/protocol/http/HTTPURLConnection.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/net/protocol/http/HTTPURLConnection.java,v
retrieving revision 1.10
diff -u -r1.10 HTTPURLConnection.java
--- gnu/java/net/protocol/http/HTTPURLConnection.java 26 May 2005 20:57:43 -0000 1.10
+++ gnu/java/net/protocol/http/HTTPURLConnection.java 15 Jun 2005 20:04:02 -0000
@@ -1,5 +1,5 @@
 /* HTTPURLConnection.java --
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -575,6 +575,10 @@
     int count = 1;
     do
       {
+        if (!i.hasNext())
+          {
+            return null;
+          }
         entry = (Map.Entry) i.next();
         count++;
       }



More information about the Java-patches mailing list