summaryrefslogtreecommitdiffstats
path: root/libjava/java/net/URLConnection.java
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-23 07:21:46 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-23 07:21:46 +0000
commit2a81deb9769ceea4775c22641c27bc9bc5399c18 (patch)
tree58c86148a9fdb9651559b0e2870b409d9678979c /libjava/java/net/URLConnection.java
parentdead842895c143db58ce3ff23af1b3921c3ebfe7 (diff)
downloadppe42-gcc-2a81deb9769ceea4775c22641c27bc9bc5399c18.tar.gz
ppe42-gcc-2a81deb9769ceea4775c22641c27bc9bc5399c18.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81080 138bc75d-0d04-0410-961f-82ee72b054a4
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 39fbd32ec28..867a53450c8 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;
OpenPOWER on IntegriCloud