FreeMarkerResultTest fails when source is checked out to path with spaces
-------------------------------------------------------------------------

                 Key: WW-2452
                 URL: https://issues.apache.org/struts/browse/WW-2452
             Project: Struts 2
          Issue Type: Bug
          Components: Unit Tests
    Affects Versions: 2.1.1
            Reporter: Al Sutton


FreeMarkerResultTest.testWithoutWriteIfCompleted fails when the build is run 
from a path which contains spaces.

The reason for this is that the following line code exists in the setUp method 
of FreeMarkerResultTest;

servletContext.setRealPath(FreeMarkerResultTest.class.getResource("someFreeMarkerFile.ftl").getFile());

getResource returns a URL, which means that any spaces are converted into %20, 
and thus instead of the real path being set as "a b" it gets set as "a%20b" and 
thus all paths are ".../a%20b/..." instead of ".../a b/..." causing the file to 
fail to open.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to