There is a problem with consistency of locating files in packed vs unpacked jars if jar entry .getName() values include the trailing slash since the corresponding file in the unpacked version does not. The VirtualFile.toURL() is what is not including the trailing '/'?
Yes toUR()L does not include the slash because it uses the default implementation which just returns the cached URL, and the URL that is constructed in AbstractJarHandler uses the stripped entry name.
Ok, since we need the entry name to have a stripped slash, I think the solution is to modify createVirtualFileHandler() in AbstractJarHandler to readd the slash to the URL that is passed to JarEntryHandler.
I can include this change in the WS deployer rework if you like.
Sure go ahead. The to URL should be returning the proper directory form and there is a org.jboss.test.virtual.test.FileVFSUnitTestCase.testDirURLs test in the mc container tests that should be expanded to pickup the current failing behavior.
Ok this is done, sorry it took awhile to get to it.