Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with PathConverter #52

Closed
CarrKnight opened this issue Apr 20, 2016 · 2 comments

Comments

@CarrKnight
Copy link

commented Apr 20, 2016

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?

@joehni joehni added the bug label Apr 20, 2016
@joehni joehni self-assigned this Apr 20, 2016
@joehni joehni added this to the 1.4.x milestone Apr 20, 2016
@joehni

This comment has been minimized.

Copy link
Member

commented Apr 20, 2016

Plain bug :-/

joehni added a commit that referenced this issue Apr 20, 2016
@joehni joehni closed this in 163de5d Apr 20, 2016
@CarrKnight

This comment has been minimized.

Copy link
Author

commented Apr 20, 2016

Thank you!

@joehni joehni modified the milestones: 1.4.x, 1.4.10 Jun 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.