I put it in dev-list because I really donot know wether it be a bug or not.
If it be a but then I'm actually willing for help.
But it seems by design but not a bug here, so I apologize.
Still, some questions hold.

/**
 * Returns a URL representing this file.
 *
 * @return the URL for the file.
 * @throws FileSystemException if an error occurs.
 */
URL getURL() throws FileSystemException;
that is the comments on getURL()
And IMO that is quite confusing actually.
You see if we use the same URL class and return it in such a public
method, it be normally to think it fit Java's standard, and can use
.URI if the protocol should be able to.
But the truth is the standard we used in vfs is sometimes different than Java.
The word [Sometimes] here is very dangerous and might be a bug causer,
because it can pass most tests and make users feel "Oh, it just return
a normal URL, and it really works right."
So IMO at least we shall add some more warning about "not using this
returned URL's some functions,including to URL, they might be
dangerous" or "we use different standard about file:// than Java's
file://"

Besides, I wonder why we must use a same URL class in vfs, if we
cannot guarantee it works consistently to Java lib?
Is it a better thought to create a new VFSURL class for URL in vfs?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to