FileArchive was changed to return dirs also. This was part of
http://fisheye4.atlassian.com/changelog/glassfish-svn/?cs=36443 to solve
This enabled exploded archive deployment.
Other existing Archive implementations don't return directory entries and it is
arguable either way what is the desired behavior looking at the javadocs of
Archive.entries() and Archive.isDirectory().
The only benefit of not including directory entries in entries() is that
Archive.getEntry() returns null as the InputStream for a directory entry - there
is no choice - a directory can't be read as a stream. So, including directory
entries in entries() means anyone iterating over them has to do a null check now
which they didn't have to do earlier. One such code is in
ReadableArchiveScannerAdapter. Even if we decide to change the semantics of
entries(), we have to change all implementations to be consistent.
The second plan of action is to evaluate an alternative fix that would address
the original issue 11766. Mitesh and I spoke about it and he is going to try out
an alternative that we outlined during the talk. As per the discussion, I am
assigning this to Mitesh.