2003-03-03 Michael Koch <konqueror@gmx.de>

* java/net/DatagramSocket.java
	(connect): Merged comment from classpath.
	(receive): Merged documentation from classpath.
	* java/net/Socket.java
	(setSoTimeout): Clarified documentation.
	* java/net/URL.java
	(getPath): Merged from classpath.
	(getUserInfo): Merged from classpath.
	(getQuery): Merged from classpath.
	* java/net/URLStreamHandler.java
	(toExternalForm): Merged from classpath.

From-SVN: r63714
This commit is contained in:
Michael Koch 2003-03-03 08:26:52 +00:00 committed by Michael Koch
parent 6e1b3a7c94
commit 6579ac0c00
5 changed files with 30 additions and 12 deletions

View file

@ -472,8 +472,8 @@ public final class URL implements Serializable
*/
public String getPath()
{
int quest = file.indexOf('?');
return quest < 0 ? file : file.substring(0, quest);
int quest = (file == null) ? -1 : file.indexOf('?');
return quest < 0 ? getFile() : file.substring(0, quest);
}
/**
@ -544,7 +544,7 @@ public final class URL implements Serializable
*/
public String getUserInfo ()
{
int at = host.indexOf('@');
int at = (host == null) ? -1 : host.indexOf('@');
return at < 0 ? null : host.substring(0, at);
}
@ -556,7 +556,7 @@ public final class URL implements Serializable
*/
public String getQuery ()
{
int quest = file.indexOf('?');
int quest = (file == null) ? -1 : file.indexOf('?');
return quest < 0 ? null : file.substring(quest + 1, file.length());
}