ResolveToPackagedName path resolver is broken on Windows

Description

Current implementation of 'org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToPackagedName' is the following:

In the case StoryLocation is represented by URL:


we will get name with unescaped ':' characters:


Such names are not valid on Windows and JBehave fail with:

WORKAROUND:
Use 'org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToSimpleName' instead of 'ResolveToPackagedName'.

POSSIBLE SOLUTION:
Use only substring that start from next character after last ':'. In this case we will cut off protocol and disk name, preserving only full path from the disk root.
Invalid of invalid name:


we will get valid one:

Assignee

Unassigned

Reporter

Dmitry Pelevin

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure