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
This commit is contained in:
Michael Koch 2004-04-23 07:21:46 +00:00 committed by Michael Koch
parent 87939d70f8
commit e9d3496882
3 changed files with 48 additions and 19 deletions

View file

@ -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;