Skip to content

Issue with PathConverter #52

@CarrKnight

Description

@CarrKnight

Here's a simple example:

        XStream stream2 = new XStream();
        String xml2 = stream2.toXML(Paths.get("directory space"));
        Path readItBack = (Path) stream2.fromXML(xml2);
        System.out.println(readItBack);

which throws the following:

---- Debugging information ----
cause-exception : java.net.URISyntaxException
cause-message : Illegal character in path at index 9: directory space
class : java.nio.file.Path
required-type : java.nio.file.Path
converter-type : com.thoughtworks.xstream.converters.SingleValueConverterWrapper
wrapped-converter : com.thoughtworks.xstream.converters.extended.PathConverter
path : /path
line number : 1

version : 1.4.9

Which is purely due to the space between "directory" and "space". Am I missing some settings or is this a bug?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions