summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-09 02:56:03 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-09 02:56:03 +0000
commit661a91eca8edc1eb8d2516f867db70a441df2bcf (patch)
tree89875cc31bd1075d40f3f5c29d1a389ea267fe70
parented36f1cf5a66a3774386a4b6ac54a360d813654a (diff)
downloadgcc-661a91eca8edc1eb8d2516f867db70a441df2bcf.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94760 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libjava/ChangeLog7
-rw-r--r--libjava/java/net/URI.java8
2 files changed, 11 insertions, 4 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 3c9d59b1f40..9a7bc27f8be 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,5 +1,12 @@
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.
* configure.ac: Reduce number of calls to AC_CHECK_FUNCS and
AC_CHECK_HEADERS.
diff --git a/libjava/java/net/URI.java b/libjava/java/net/URI.java
index 4de5095bbbb..23e3e7c9e4a 100644
--- a/libjava/java/net/URI.java
+++ b/libjava/java/net/URI.java
@@ -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;