Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Done
-
Affects Version/s: 1.0.0-cr-2
-
Fix Version/s: 1.1.0-alpha-1
-
Component/s: None
-
Labels:None
-
Git Pull Request:
Description
We have a directory gwtutil with 10+ classes in there, which we want to delete from the archive
This does nothing, it does not even fail-fast:
webArchive.delete(ArchivePaths.create("WEB-INF/classes/org/drools/guvnor/gwtutil/"));
|
This does work:
webArchive.delete(ArchivePaths.create("WEB-INF/classes/org/drools/guvnor/gwtutil"));
|
The difference is the absence of the trailing /.
Using arquillian bom CR5
Paths wihtin archives are represented without the trailing slash, so the above mentioned behaviour makes sense since the gwtutil path is represented within the archive as "WEB-INF/classes/org/drools/guvnor/gwtutil" (without a trailing slash). That's why the second operation works, while the first path won't match the path within the archive.
It would be nice though if the first operation (path with trailing slash) would match the path within the archive which has no trailing slash.
While writing a test case to reproduce/test this behaviour I found a bug in the Archive.contains method, where deleted paths can still be indicated as present in the archive, when they infact are not.
I'm working on a solution for both the handling of a possible trailing slash in the path, as it would be a nice feature, as well as fixing the bug in the contains-method.