aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/net/URLConnection.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-04-23 07:21:46 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2004-04-23 07:21:46 +0000
commite9d34968823670f95b9b2caba30f007ac9f383c5 (patch)
tree58c86148a9fdb9651559b0e2870b409d9678979c /libjava/java/net/URLConnection.java
parent87939d70f8e59736e8d8d19b04694363452a817e (diff)
downloadgcc-e9d34968823670f95b9b2caba30f007ac9f383c5.zip
gcc-e9d34968823670f95b9b2caba30f007ac9f383c5.tar.gz
gcc-e9d34968823670f95b9b2caba30f007ac9f383c5.tar.bz2
2004-04-23 Michael Koch <konqueror@gmx.de>
* java/net/URL.java (hashcode): Don't initialize with default value explicitely. (getContent): Removed redundant "final" keyword. (openStream): Likewise. (getURLStreamHandler): Fixed coding style. * java/net/URLConnection.java (defaultAllowUserInteraction): Don't initialize with default value explicitely. (connected): Likewise. (doOutput): Likewise. (ifModifiedSince): Likewise. (dateformats_initialized): Likewise. (setURLStreamHander): Use StreamTokenizer where it belongs to. From-SVN: r81080
Diffstat (limited to 'libjava/java/net/URLConnection.java')
-rw-r--r--libjava/java/net/URLConnection.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/libjava/java/net/URLConnection.java b/libjava/java/net/URLConnection.java
index 39fbd32..867a534 100644
--- a/libjava/java/net/URLConnection.java
+++ b/libjava/java/net/URLConnection.java
@@ -432,10 +432,10 @@ public abstract class URLConnection
String type = getContentType();
ContentHandler ch = setContentHandler(type);
- if (ch != null)
- return ch.getContent(this);
+ if (ch == null)
+ return getInputStream();
- return getInputStream();
+ return ch.getContent(this);
}
/**
@@ -993,7 +993,6 @@ public abstract class URLConnection
// Replace the '/' character in the content type with '.' and
// all other non-alphabetic, non-numeric characters with '_'.
- StringTokenizer pkgPrefix = new StringTokenizer(propVal, "|");
char[] cArray = contentType.toCharArray();
for (int i = 0; i < cArray.length; i++)
{
@@ -1007,6 +1006,7 @@ public abstract class URLConnection
String contentClass = new String(cArray);
// See if a class of this content type exists in any of the packages.
+ StringTokenizer pkgPrefix = new StringTokenizer(propVal, "|");
do
{
String facName = pkgPrefix.nextToken() + "." + contentClass;