commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: File(URI) constructor.


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:

Bryce McKinlay wrote:
Should this use equalsIgnoreCase() ?

Isn't the scheme always in lowercase?
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:

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]