This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
RE: URLStreamHandler.parseURL() (was RE: Patch: more protocol fun in URL)
- From: "Jeroen Frijters" <jeroen at sumatra dot nl>
- To: <gnustuff at thisiscool dot com>
- Cc: "Mark Wielaard" <mark at klomp dot org>,<commit-classpath at gnu dot org>,<tromey at redhat dot com>,<java-patches at gcc dot gnu dot org>
- Date: Mon, 5 Jul 2004 17:25:35 +0200
- Subject: RE: URLStreamHandler.parseURL() (was RE: Patch: more protocol fun in URL)
Mohan Embar wrote:
> You have removed this block:
>
> -if (lastSlash < 0 && File.separatorChar != sepChar
> - && url.getProtocol().equals("file"))
> - {
> - // On Windows, even '\' is allowed in a "file" URL.
> - sepChar = File.separatorChar;
> - lastSlash = file.lastIndexOf(sepChar);
> - }
>
> ...and have replaced it with this:
>
> +int lastSlash = file.lastIndexOf('/');
>
> ...but nowhere in your patch have you changed the
> original contents of the file variable, which contains
> this backslash.
Thanks, I see what you mean now. I still disagree with it though ;-)
AFAIK, on Windows a '\' is not valid in a url, so URL.getFile() should
always return a '/' separated path. If it doesn't do that, then this
should be fixed, but I don't think the problem is here.
Regards,
Jeroen