From e930d01a4fb071e00edb80bc0c5a878733394bbf Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Thu, 22 Apr 2004 07:02:26 +0000 Subject: [multiple changes] 2004-04-22 Jeroen Frijters * java/net/URLStreamHandler.java (parseURL): Convert the file path to using '/' instead of native file separator. 2004-04-22 Guilhem Lavaux * java/net/URL.java (userInfo): New field. (URL): Set authority to the right value. (setURL): Fixed authority and file initialization. * java/net/URLStreamHandler.java (parseURL): Take care of the query tag. Build authority. (toExternalForm): Fixed URL building using authority. From-SVN: r81006 --- libjava/java/net/URLConnection.java | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'libjava/java/net/URLConnection.java') diff --git a/libjava/java/net/URLConnection.java b/libjava/java/net/URLConnection.java index 6b12568..39fbd32 100644 --- a/libjava/java/net/URLConnection.java +++ b/libjava/java/net/URLConnection.java @@ -108,7 +108,7 @@ public abstract class URLConnection * This is the default value that will be used to determine whether or * not user interaction should be allowed. */ - private static boolean defaultAllowUserInteraction = false; + private static boolean defaultAllowUserInteraction; /** * This is the default flag indicating whether or not to use caches to @@ -126,7 +126,7 @@ public abstract class URLConnection * Indicates whether or not a connection has been established to the * destination specified in the URL */ - protected boolean connected = false; + protected boolean connected; /** * Indicates whether or not input can be read from this URL @@ -136,7 +136,7 @@ public abstract class URLConnection /** * Indicates whether or not output can be sent to this URL */ - protected boolean doOutput = false; + protected boolean doOutput; /** * If this flag is set, the protocol is allowed to cache data whenever @@ -157,7 +157,7 @@ public abstract class URLConnection * modified more recently than the date set in this variable. That date * should be specified as the number of seconds since 1/1/1970 GMT. */ - protected long ifModifiedSince = 0L; + protected long ifModifiedSince; /** * This is the URL associated with this connection @@ -165,8 +165,10 @@ public abstract class URLConnection protected URL url; private static Hashtable handlers = new Hashtable(); - private static SimpleDateFormat dateFormat1, dateFormat2, dateFormat3; - private static boolean dateformats_initialized = false; + private static SimpleDateFormat dateFormat1; + private static SimpleDateFormat dateFormat2; + private static SimpleDateFormat dateFormat3; + private static boolean dateformats_initialized; /** * Creates a URL connection to a given URL. A real connection is not made. @@ -430,10 +432,10 @@ public abstract class URLConnection String type = getContentType(); ContentHandler ch = setContentHandler(type); - if (ch == null) - return getInputStream(); + if (ch != null) + return ch.getContent(this); - return ch.getContent(this); + return getInputStream(); } /** -- cgit v1.1