URI.java (AUTHORITY_REGEXP): Handle case where user name or port is missing.

* java/net/URI.java (AUTHORITY_REGEXP): Handle case where user
	name or port is missing.
	(AUTHORITY_USERINFO_GROUP, AUTHORITY_HOST_GROUP,
	AUTHORITY_PORT_GROUP): Updated.

From-SVN: r94760
This commit is contained in:
Tom Tromey 2005-02-09 02:56:03 +00:00 committed by Tom Tromey
parent 9f4faeaee1
commit e99e6d711d
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2005-02-08 Tom Tromey <tromey@redhat.com>
* java/net/URI.java (AUTHORITY_REGEXP): Handle case where user
name or port is missing.
(AUTHORITY_USERINFO_GROUP, AUTHORITY_HOST_GROUP,
AUTHORITY_PORT_GROUP): Updated.
2005-02-08 Tom Tromey <tromey@redhat.com>
* configure: Rebuilt.

View File

@ -65,7 +65,7 @@ public final class URI implements Comparable, Serializable
"^(([^:/?#]+):)?((//([^/?#]*))?([^?#]*)(\\?([^#]*))?)?(#(.*))?";
private static final String AUTHORITY_REGEXP =
"^(([^?#]*)@([^?#]*):([^?#]*))?";
"^((([^?#]*)@)?([^?#:]*)(:([^?#]*)))?";
/**
* Valid characters (taken from rfc2396)
@ -115,9 +115,9 @@ public final class URI implements Comparable, Serializable
*/
private static final int FRAGMENT_GROUP = 10;
private static final int AUTHORITY_USERINFO_GROUP = 2;
private static final int AUTHORITY_HOST_GROUP = 3;
private static final int AUTHORITY_PORT_GROUP = 4;
private static final int AUTHORITY_USERINFO_GROUP = 3;
private static final int AUTHORITY_HOST_GROUP = 4;
private static final int AUTHORITY_PORT_GROUP = 6;
private transient String scheme;
private transient String rawSchemeSpecificPart;