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

Test failure in testReadFromValidCSVContentString.java on Windows #28

Merged
merged 2 commits into from
Nov 1, 2019

Conversation

iSnow
Copy link
Contributor

@iSnow iSnow commented Oct 16, 2019

Overview

Compiling the tableschema jar under Windows gives me the following test exception:

testReadFromValidCSVContentString(io.frictionlessdata.tableschema.TableTest)  Time elapsed: 0.027 sec  <<< ERROR!
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/isnow/Projects/workspace/tableschema-java/target/test-classes/fixtures/simple_data.csv
    at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
    at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
    at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
    at java.nio.file.Paths.get(Paths.java:84)
    at io.frictionlessdata.tableschema.TableTest.testReadFromValidCSVContentString(TableTest.java:43)

This is due to the incorrect construction of the path in question; a similar question and explanation can be found here: https://bugs.openjdk.java.net/browse/JDK-8197918?focusedCommentId=14156698&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14156698

The underlying problem doesn't manifest on Unix-like systems, but due to Windows peculiar file paths, it triggers an exception.

After applying the proposed solution, the test passes in my environment.


Please preserve this line to notify @georgeslabreche (maintainer of this repository)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 77.112% when pulling 8703e36 on iSnow:master into c49b34e on frictionlessdata:master.

@roll
Copy link
Member

roll commented Oct 21, 2019

Thanks @iSnow!

I'm not sure if @georgeslabreche is available for review at the moment. I think we need to wait a little bit.

BTW we're looking for people to join our @frictionlessdata/java team to help us work on tableschema/datapackage-java. Let me know if you're interested.

@iSnow
Copy link
Contributor Author

iSnow commented Oct 22, 2019

Thanks for the invitation, @roll, I am thrilled.

I would be interested as I am using it for a project ATM. Before you invite me to the team, please do have a look at the API improvement ticket I created a couple of days ago. You don't need to have a deep understanding of Java to see this would influence the API quite a bit. If I get to join and kind of take over the Java version, I would want work on this rather deep change, not just fix bugs. So please tell me if that is OK for you. I think I have the Java experience for it (>15y) and would hope I know idiomatic Java by now. I also read through the specs on the frictionless site and didn't see rules for how to instantiate objects, so I guess it should be cool. But please do give me feedback. If you are cool with it, please do invite me.

Something else I would work right away is the upload of the artifact to Maven Central. I have done this for a different project I am working on, so I know the process.

@roll
Copy link
Member

roll commented Oct 23, 2019

@iSnow
That's really exciting! I'm going to take a look at frictionlessdata/datapackage-java#29 in coming days

@iSnow iSnow requested a review from georgeslabreche November 1, 2019 06:13
@iSnow iSnow merged commit af278db into frictionlessdata:master Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants