Shon Vella created VFS-515:
------------------------------

             Summary: AbstractFileObject.getURL() returns flaky URL object
                 Key: VFS-515
                 URL: https://issues.apache.org/jira/browse/VFS-515
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 2.0, 2.1
         Environment: OSX 10.9.2
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
            Reporter: Shon Vella


URL returned is created with constructor that expects host as a separate 
parameter from path and passes in empty string for host. As a result subsequent 
calls to url.getHost() returns an empty string rather than the host encoded in 
the path.

Test Code

FileSystemManager fsManager = VFS.getManager();
FileObject f = fsManager.resolveFile("ftp://localhost/etc/hosts";);
URL url = f.getURL();
String host = url.getHost();
assertEquals("localhost", host);




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to