On Fri, Apr 19, 2019 at 6:13 PM Gary Gregory <garydgreg...@gmail.com> wrote: > > Hi, > > WRT > https://builds.apache.org/job/Apache%20Commons%20VFS/org.apache.commons$commons-vfs2/9/testReport/junit/org.apache.commons.vfs2.test/UriTests/testAbsoluteURI/ > > I just replaced the old svn-based build with a git-based build. > > I called the project "Apache Commons VFS" in the UI and Jenkins put the > project in a folder of the same name. > > Notice the failure in the report above which contains: > > org.apache.commons.vfs2.FileSystemException: Badly formed URI > "file:///home/jenkins/jenkins-slave/workspace/Apache Commons > VFS/commons-vfs2/target/test-classes/test-data/read-tests". > at > org.apache.commons.vfs2.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:73) > at > org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:716) > at > org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:653) > at > org.apache.commons.vfs2.test.UriTests.testAbsoluteURI(UriTests.java:43) > at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.apache.commons.vfs2.test.AbstractProviderTestCase.runTest(AbstractProviderTestCase.java:198) > at junit.framework.TestCase.runBare(TestCase.java:141) > at junit.framework.TestResult$1.protect(TestResult.java:122) > at junit.framework.TestResult.runProtected(TestResult.java:142) > at junit.framework.TestResult.run(TestResult.java:125) > at junit.framework.TestCase.run(TestCase.java:129) > at junit.framework.TestSuite.runTest(TestSuite.java:252) > at junit.framework.TestSuite.run(TestSuite.java:247) > at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23) > at > org.apache.commons.vfs2.test.AbstractTestSuite$1.protect(AbstractTestSuite.java:132) > at junit.framework.TestResult.runProtected(TestResult.java:142) > at > org.apache.commons.vfs2.test.AbstractTestSuite.run(AbstractTestSuite.java:137) > at > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86) > at > org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367) > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274) > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) > at > org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161) > at > org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) > at > org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) > at > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) > Caused by: java.lang.IllegalArgumentException: Illegal character in > path at index 51: file:///home/jenkins/jenkins-slave/workspace/Apache > Commons VFS/commons-vfs2/target/test-classes/test-data/read-tests > at java.net.URI.create(URI.java:852) > at > org.apache.commons.vfs2.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:59) > ... 26 more > Caused by: java.net.URISyntaxException: Illegal character in path at > index 51: file:///home/jenkins/jenkins-slave/workspace/Apache Commons > VFS/commons-vfs2/target/test-classes/test-data/read-tests > at java.net.URI$Parser.fail(URI.java:2848) > at java.net.URI$Parser.checkChars(URI.java:3021) > at java.net.URI$Parser.parseHierarchical(URI.java:3105) > at java.net.URI$Parser.parse(URI.java:3053) > at java.net.URI.<init>(URI.java:588) > at java.net.URI.create(URI.java:850) > ... 27 more > > I wonder if this is something we need to fix in VFS? I just don't want > us to hack the test to make it work if there is a real underlying > issue.
I now notice the difference between `new URL("file://.../Apache Commons VFS/...")` and `URI.create("file://.../Apache Commons VFS/...")`. The former doesn't throw an exception at all whereas the latter does. And, the latter replaced the former with commit b913ebd36a136efc99195fef9f8a857b55d02545 for VFS-360 in my contribution. Good news is the URIs or URLs are just local variables. [1] So, perhaps shall we change it back to use URLs again? Regards, Woonsan [1] org.apache.commons.vfs2.provider.url.UrlFileProvider.findFile(FileObject, String, FileSystemOptions) > > Thoughts, > > Gary --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org