{"action":"created","issue":{"url":"https://api.github.com/repos/teamed/qulice/issues/397","labels_url":"https://api.github.com/repos/teamed/qulice/issues/397/labels{/name}","comments_url":"https://api.github.com/repos/teamed/qulice/issues/397/comments","events_url":"https://api.github.com/repos/teamed/qulice/issues/397/events","html_url":"https://github.com/teamed/qulice/issues/397","id":56361392,"number":397,"title":"URISyntaxException","user":{"login":"maurezen","id":569536,"avatar_url":"https://avatars.githubusercontent.com/u/569536?v=3","gravatar_id":"","url":"https://api.github.com/users/maurezen","html_url":"https://github.com/maurezen","followers_url":"https://api.github.com/users/maurezen/followers","following_url":"https://api.github.com/users/maurezen/following{/other_user}","gists_url":"https://api.github.com/users/maurezen/gists{/gist_id}","starred_url":"https://api.github.com/users/maurezen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maurezen/subscriptions","organizations_url":"https://api.github.com/users/maurezen/orgs","repos_url":"https://api.github.com/users/maurezen/repos","events_url":"https://api.github.com/users/maurezen/events{/privacy}","received_events_url":"https://api.github.com/users/maurezen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/teamed/qulice/labels/30%20mins","name":"30 mins","color":"eb6421"},{"url":"https://api.github.com/repos/teamed/qulice/labels/@krzyk","name":"@krzyk","color":"009801"},{"url":"https://api.github.com/repos/teamed/qulice/labels/bug","name":"bug","color":"c0c0c0"},{"url":"https://api.github.com/repos/teamed/qulice/labels/DEV","name":"DEV","color":"bfd4f3"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-02-03T10:46:17Z","updated_at":"2015-04-11T14:38:39Z","closed_at":null,"body":"In `DefaultMavenEnvironment#classLoader` there is a following code:\r\n```java\r\n    urls.add(\r\n        URI.create(String.format(\"file:///%s\", path)).toURL()\r\n    );\r\n```\r\nIt gets executed for each entry in `this,classpath()`. If any entry contains space, this results in `URISyntaxException`. \r\nA simple example of how this happens here jcabi/jcabi-xml#49 - Windows, maven repo in Documents and Settings folder, maven artifacts in classpath.\r\nRelevant part of the log:\r\n>`Caused by: java.lang.IllegalArgumentException: Illegal character in path at index 19: file://C:/Documents and Settings/JustUser/.m2/reposito\r\nry/com/jcabi/jcabi-aspects/0.20.1/jcabi-aspects-0.20.1.jar\r\n        at java.net.URI.create(URI.java:859)\r\n        at com.qulice.maven.DefaultMavenEnvironment.classloader(DefaultMavenEnvironment.java:152)\r\n        at com.qulice.checkstyle.CheckstyleValidator.validate(CheckstyleValidator.java:81)\r\n        at com.qulice.maven.CheckMojo.run(CheckMojo.java:83)\r\n        at com.qulice.maven.CheckMojo.doExecute(CheckMojo.java:59)\r\n        at com.qulice.maven.AbstractQuliceMojo.execute(AbstractQuliceMojo.java:175)\r\n        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)\r\n        ... 20 more\r\nCaused by: java.net.URISyntaxException: Illegal character in path at index 19: file://C:/Documents and Settings/JustUser/.m2/repository/com/\r\njcabi/jcabi-aspects/0.20.1/jcabi-aspects-0.20.1.jar\r\n        at java.net.URI$Parser.fail(URI.java:2829)\r\n        at java.net.URI$Parser.checkChars(URI.java:3002)\r\n        at java.net.URI$Parser.parseHierarchical(URI.java:3086)\r\n        at java.net.URI$Parser.parse(URI.java:3034)\r\n        at java.net.URI.(URI.java:595)\r\n        at java.net.URI.create(URI.java:857)\r\n        ... 26 more`\r\n\r\nSuggested way of fixing it is using `File#toURI` instead of `new URI(String)`."},"comment":{"url":"https://api.github.com/repos/teamed/qulice/issues/comments/91863215","html_url":"https://github.com/teamed/qulice/issues/397#issuecomment-91863215","issue_url":"https://api.github.com/repos/teamed/qulice/issues/397","id":91863215,"user":{"login":"krzyk","id":105730,"avatar_url":"https://avatars.githubusercontent.com/u/105730?v=3","gravatar_id":"","url":"https://api.github.com/users/krzyk","html_url":"https://github.com/krzyk","followers_url":"https://api.github.com/users/krzyk/followers","following_url":"https://api.github.com/users/krzyk/following{/other_user}","gists_url":"https://api.github.com/users/krzyk/gists{/gist_id}","starred_url":"https://api.github.com/users/krzyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzyk/subscriptions","organizations_url":"https://api.github.com/users/krzyk/orgs","repos_url":"https://api.github.com/users/krzyk/repos","events_url":"https://api.github.com/users/krzyk/events{/privacy}","received_events_url":"https://api.github.com/users/krzyk/received_events","type":"User","site_admin":false},"created_at":"2015-04-11T14:38:39Z","updated_at":"2015-04-11T14:38:39Z","body":"@maurezen strange, because there is explicit case for spaces in the URL, so this must be some other case. Do you have the full stack trace and the URL for which it fails?"}}