|
From: | Bryce McKinlay |
Subject: | Re: Patch: File(URI) constructor. |
Date: | Tue, 06 Jul 2004 12:56:43 -0400 |
User-agent: | Mozilla Thunderbird 0.5 (X11/20040626) |
Jeroen Frijters wrote:
Basied on the result of my quick test case, it will be in whatever case was used when constructing the URI instance. Presumably, URI schemes are also case insensitive. Our URI implementation appears to be buggy, however. Check the result of the following test case:Bryce McKinlay wrote:Should this use equalsIgnoreCase() ?Isn't the scheme always in lowercase?
import java.net.*; public class URITest { public static void main(String[] args) throws Exception { URI uri = new URI("FILE:///foo/bar"); System.out.println (uri.getScheme()); URI uri2 = new URI("fIlE:///foo/bar"); System.out.println (uri2.getScheme()); System.out.println(uri.equals(uri2)); } } Regards Bryce
[Prev in Thread] | Current Thread | [Next in Thread] |