"alesj" wrote : We do this in our VFS code:
|
| | if (file.isFile() && JarUtils.isArchive(file.getName()))
| | {
| | String name = file.getName();
| | try
| | {
| | return new JarHandler(this, parent, file, file.toURL(), name);
| | }
| | catch (IOException e)
| | {
| | log.debug(e.getMessage());
| | }
| | }
| | return createVirtualFileHandler(parent, file, fileURL);
| |
|
| And since we moved over to VFS.getChild returning null, instead of VFS.findChild which
heavily complained when it didn't found what we were looking for, a lot of things gets
silently suppressed - e.g. trying to find META-INF on a broken jar file == trying to find
a META-INF child on a FileHandler, resulting in a silent null being returned. And this is
true for all file lookups on this broken jar, meaning even more silent nulls being
returned.
| But the problem is that from 'outside' this file looks OK, except for this
debug message. :-)
|
| Should we throw exception fwd or at least do a warn?
How do you tell difference between a broken jar and a plain file that has
an extension that is the same as an archive? :-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135922#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...