[ 
https://issues.apache.org/jira/browse/TAVERNA-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16467449#comment-16467449
 ] 

Stian Soiland-Reyes commented on TAVERNA-1043:
----------------------------------------------

Fixed in Taverna Language - uses "folder" in .toString() and "folder/" in 
.toURI() and JSON serialization (Proxy.getFolder()) - now consistent across 
JDK8, 9 and 10.

The removal of trailing / is done in the BundleFileSystem.wrap(Path) which is 
the only call to the BundlePath constructor.

> Java 9: ZIPFS folders no longer ends with /
> -------------------------------------------
>
>                 Key: TAVERNA-1043
>                 URL: https://issues.apache.org/jira/browse/TAVERNA-1043
>             Project: Apache Taverna
>          Issue Type: Bug
>          Components: Taverna Language
>    Affects Versions: language 0.15.1
>         Environment: JDK 9
>            Reporter: Stian Soiland-Reyes
>            Assignee: Stian Soiland-Reyes
>            Priority: Major
>             Fix For: language 0.16.0
>
>
> Taverna Language on JDK9 fails with:
> {code}
> Failed tests: 
>   TestZipFS.directoryOrFile:134
>   TestManifest.populateFromBundle:93
>   TestManifest.repopulateFromBundle:130
>   TestManifestJSON.createBundle:206->checkManifestJson:290 
> expected:</folder[/]> but was:</folder[]>
> {code}
> This seems mainly to be because this [JDK7 
> bug|https://stackoverflow.com/questions/16588321/java-7-zipfs-file-is-also-a-folder]
>  has finally been fixed. We used to test this in 
> [TestZipFS](https://github.com/apache/incubator-taverna-language/blob/0.15.1-incubating/taverna-robundle/src/test/java/org/apache/taverna/robundle/fs/TestZipFS.java#L95)
>  - but this test now fails as the underlying ZipFS now in JDK9 finally 
> correctly throws FileAlreadyExistsException if attempting to make {{folder/}} 
> after having made a file called just {{folder}}.
> But this mean some of the other code (and their tests) maintaining the 
> manifest.json gets inconsistent folder paths with or without trailing /. We 
> should keep the JSON serialization and RO API with / at the end for 
> consistency.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to