[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/23468] java.net.URI regex throws URISyntaxException given
From: |
chris at hubick dot com |
Subject: |
[Bug classpath/23468] java.net.URI regex throws URISyntaxException given a URL |
Date: |
18 Aug 2005 21:35:39 -0000 |
------- Additional Comments From chris at hubick dot com 2005-08-18 21:35
-------
Ok, so looking at the code from
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/URI.java?rev=1.16&content-type=text/vnd.viewcvs-markup
It says it uses the regexp from http://www.ietf.org/rfc/rfc2396.txt Appendix B,
but, looking at that URL, they appear slightly different:
URI: ^(([^:/?#]+):)?((//([^/?#]*))?([^?#]*)(\\?([^#]*))?)?(#(.*))?
RFC: ^(([^:/?#]+):)?( //([^/?#]*))?([^?#]*)( \?([^#]*)) ?(#(.*))?
I added whitespace to the RFC version for alignment clarity. I know that the
backslash needs the escape, being in Java source code, but I don't know enough
about regexps to tell if the other differences are a bug with the regex or the
classpath regex evaluation code. ?
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|java.net.URI throws |java.net.URI regex throws
|URISyntaxException given a |URISyntaxException given a
|URL |URL
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23468