[ 
https://jira.codehaus.org/browse/JBEHAVE-747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mauro Talevi resolved JBEHAVE-747.
----------------------------------

       Resolution: Duplicate
    Fix Version/s: 3.6

Duplicate of JBEHAVE-712
                
> codeLocationFromPath breaks for paths with spaces
> -------------------------------------------------
>
>                 Key: JBEHAVE-747
>                 URL: https://jira.codehaus.org/browse/JBEHAVE-747
>             Project: JBehave
>          Issue Type: Bug
>          Components: Core, Core Examples
>    Affects Versions: 3.5.4
>         Environment: Windows 7 Enterprise 64-bit, Version 6.1 (Build 7600)
> Ubuntu Linux 10.04.3 LTS
>            Reporter: Ryan Nelson
>            Priority: Minor
>              Labels: breaking
>             Fix For: 3.6
>
>
> I discovered this in the Guice examples, but it's not a problem limited to 
> Guice.  Take this code that searches for stories:
> new StoryFinder().findPaths( CodeLocations.codeLocationFromPath( "resources" 
> ).getFile(), asList( "**/*.story" ), null );
> If the "resources" folder resides in a base path that contains a space, the 
> StoryFinder will fail to locate the stories.  This is because 
> codeLocationFromPath() uses a java.net.URL object under-the-hood to URL 
> encode the path, converting spaces to %20.  Thus, jBehave will look here:
> c:\jbehave\folder%20with%20spaces\resources
> for stories located here:
> c:\jbehave\folder with spaces\resources
> This is also a problem for reports.  If relative paths are used in any form, 
> when jBehave converts them to full paths, the paths are URL-encoded.  This in 
> turn causes our Hudson builds to fail because it cannot locate the reports.
> The workaround for this is to not use CodeLocations to locate stories, and to 
> use a Hudson project with no spaces, but jBehave really should support paths 
> with spaces.  This occurs on both Windows and Linux.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to