You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Don Brown (JIRA)" <ji...@apache.org> on 2008/02/16 13:02:39 UTC

[jira] Resolved: (WW-2452) FreeMarkerResultTest fails when source is checked out to path with spaces

     [ https://issues.apache.org/struts/browse/WW-2452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown resolved WW-2452.
---------------------------

    Resolution: Fixed
      Assignee: Don Brown

Fixed, thanks for the patch!

> 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
>            Assignee: Don Brown
>             Fix For: 2.1.1
>
>         Attachments: FreeMarkerResultTest_spaces_in_path_fix.diff
>
>
> 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.