Hide
An URL that denotes a directory have to ends with a '/'.
When creating the URL from a File, the filesystem tries to determine if the File is a directory or not, if it is, the final '/' is appended. But if it cannot (File does not exist for example), no '/' is appended.
So, when a DirectoryArchiveImpl is first created, its URL ends with a '/', but if the file is removed, each call to IArchive.getURL() will return an URL without '/'. That is a problem because the URL is usually used as a key...
Caching the initial value should solve the problem.
Show
An URL that denotes a directory have to ends with a '/'.
When creating the URL from a File, the filesystem tries to determine if the File is a directory or not, if it is, the final '/' is appended. But if it cannot (File does not exist for example), no '/' is appended.
So, when a DirectoryArchiveImpl is first created, its URL ends with a '/', but if the file is removed, each call to IArchive.getURL() will return an URL without '/'. That is a problem because the URL is usually used as a key...
Caching the initial value should solve the problem.