[jboss-dev-forums] [Design the new POJO MicroContainer] - SuffixMatchFilter default VisitorAttributes does not make se
scott.stark@jboss.org
do-not-reply at jboss.com
Thu Oct 26 20:06:43 EDT 2006
A hangover from the isArchive removal is that the default VisitorAttributes.RECURSE_LEAVES_ONLY used by the org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter don't work for "archives" (.jar, .sar, ... java archives, be they zip files or directories). This simple code usage:
| SuffixMatchFilter earLibFilter = SuffixMatchFilter(".jar");
| List<VirtualFile> archives = lib.getChildren(earLibFilter);
|
results in no .jar files being found, even though they exist. The reason is that .jar files are directories, and only visiting leaves means they are not visited. They are in fact traversed for leaves to visit, and this is also not a default desired behavior, at least for this example usage. For this usage what we want is the VisitorAttributes.DEFAULT, which is to visit both leaves/non-leaves and not to recurse. I would say that this should be the default
VisitorAttributes used.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981188#3981188
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981188
More information about the jboss-dev-forums
mailing list