Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0, 2.0
-
None
-
Windows Seven, JDK 1.6 64 bit
Description
Consider a local directory tree containing files with hashs in their name, such as test-hash-#.txt.
When walking the tree using FileObject.findFiles(), the file is correctly found and returned, but it's URL is truncated to the #: test-hash-
- Calling file.getURL().toString() returns file://my/dir/test-hash-
- Calling file.toString() returns the correct URL file://my/dir/test-hash-#.txt
- For the sake of testing, calling new URL("http://my/file/with/hash-#.txt").toString() returns http://my/file/with/hash-#.txt (It's not an java.net.URL problem)
I think file.getURL().toString() should return test-hash-#.txt, otherwise caller have to rely on file.toString() to retrieve the URL of the file, which is probably bad.