On Wed, 25 Apr 2018 23:34:55 +0100, Stian Soiland-Reyes <[email protected]> wrote: > a) If we always remove trailing "/" as far as Path.toString() is > concerned, then this simplifies some things, e.g. as JDK9 native, and > a directory path looks the same even if it has not been created yet > (isDirectory() will say false if it does not exist). However it means > we have to selectively re-add the trailing / in .toURL() and Manifest > JSON to be compatible with > https://researchobject.github.io/specifications/bundle/#manifest-bundledAs > - e.g. a new @JsonProperty, or to get JSON-LD parsing to work with > base URIs. In JDK9 this breaks a bit backwards-compatability against > previous Taverna Language release, but I don't think we have used the > folder strings too much outside ...? (famous last words)
For forward-compatibility with JDK9 file system this option is now committed on taverna-language master: https://github.com/apache/incubator-taverna-language/compare/97052ae28...71b91b216 So if someone asks a BundleFileSystem (or Path) for folder/ (as I think taverna-databundle would) then it gets rewritten to /folder in the Path.toString() - but will be folder/ in the JSON/URI methods .o So assuming nobody does folderPath + "fred" string concatination of paths we are safe.. those should always be in style folderPath.resolve("fred") with java.nio Paths. We'll let Jenkins check the rest. -- Stian Soiland-Reyes http://www.esciencelab.org.uk/ http://orcid.org/0000-0001-9842-9718
