|
From: | Robert Schuster |
Subject: | Re: [cp-patches] [RFC] XML - fix for XMLParser's URL problem |
Date: | Sat, 08 Oct 2005 17:10:18 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.12) Gecko/20051005 |
Hi Chris. Disclaimer: I am neither an URL nor an an XML expert. The problem with your suggestion is: a) Sun's URL class accepts (throws no MalformedURLException) file:////home/foo it adresses the file: //home/foo (which my bash accepts as well). Furthermore: Not accepting superfluous slashes would not help the application in which I found this problem. b) Changing URL in a way that toString() returns the right value (that means not swallowing the two slashes) would introduce an incompatibility with the JDK. At last I find it better to fix URL's toString() because it seems so strikingly wrong for me that in this scenario: u = new URL("file:////home/bla"); u2 = new URL(u.toString()); u and u2 do not resolve the same file. Any other opinions? cu Robert
[Prev in Thread] | Current Thread | [Next in Thread] |