Patch to URL.java

Stephen Crane jscrane at maths.tcd.ie
Mon Feb 1 15:23:06 PST 1999


[It seems my From: address in previous postings was omitted (my fault) 
hope it's fixed now.]

Here is a small patch, against snap-990130, to URL.java, URL.openConnection().
According to "Java in a Nutshell" an URLConnection's set methods must be
called before URLConnection.connect() is called.  If a "connected connection"
is returned from URL.openConnection(), these become unusable.  

This patch does not affect existing applications because "other methods 
that depend on being connected will call this method [connect()]."

Cheers,
Steve	(jscrane at maths.tcd.ie)

*** URL.java.orig	Mon Feb  1 23:13:32 1999
--- URL.java	Mon Feb  1 23:14:38 1999
***************
*** 164,170 ****
  			handler = getURLStreamHandler(protocol);
  		}
  		conn = handler.openConnection(this);
- 		conn.connect();
  	}
  	return (conn);
  }
--- 164,169 ----


More information about the kaffe mailing list