[custom build of 20041029 sources; JDK 1.4.2_04]
I have the complete NB source tree checked out
in a directory with spaces in path:
C:\Documents and Settings\honza\sources
When running commit validation suite on this
source tree, four unit tests from
ant/project:EditablePropertiesTest are failing
(2 fails, 2 errors). The failure message is
in assertFile : C:\Documents%20and%
pport\ant\data\test.properties (The system
cannot find the path specified)
The problem seems to be the URI.toPath() call in
the filenameOfTestProperties method which
returns spaces escaped as '%20'. The assertFile
method in the NB junit extension cannot open
files with escaped chars in names.
I'll attach a patch shortly.
Created attachment 18615 [details]
Should read "... problem seems to be the URL.toPath() call..."
The patch is not correct but it is simple to write one that is.
*Never* extract the filename from a 'file' scheme URI using getPath
(even if you .replace('/', File.separatorChar), which this patch did
not). Always use new File(uri) which is designed for this purpose and
may have additional specialized behavior which is intentionally not
documented by the Java platform.
committed Up-To-Date 1.9
This issue was solved long time ago. Because nobody has reopened it neither
added comments, we are verifying/closing it now.
If you are still able to reproduce the problem, please reopen. Thanks in advance.