[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with URLStreamHandler.java when running Jigsaw with ORP plus C
From: |
Wu, Gansha |
Subject: |
Problems with URLStreamHandler.java when running Jigsaw with ORP plus Classpath |
Date: |
Mon, 30 Jul 2001 09:39:12 +0800 |
This is second of the series.
The problem in URLStreamHandler.java:
Consider the snippet in parse():
// Process host and port
int slash_index = url_string.indexOf("/");
int colon_index = url_string.indexOf(":");
Also here windows-style path name isn't counted in. We have URL
patterns like "file://d:\dir\dir\file.xxx", and they will fail in parsing. A
patch here is:
// Process host and port
+ url_string =
url_string.replace(System.getProperty("file.separator").charAt(0), '/');
int slash_index = url_string.indexOf("/");
int colon_index = url_string.indexOf(":");
Of course it's also not very elegant.
Like last post about File.java, we think it's better to delegate these
platform-dependent judgements to a standalone platform-wise class.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Problems with URLStreamHandler.java when running Jigsaw with ORP plus Classpath,
Wu, Gansha <=