1. glassfish
  2. GLASSFISH-14367

FileArchive.entries() now returns dir entries unlike other archives


    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1
    • Fix Version/s: future release
    • Component/s: deployment
    • Labels:
    • Environment:

      Operating System: All
      Platform: All


      FileArchive was changed to return dirs also. This was part of 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.


        Mitesh Meswani added a comment -

        Targeting for 3.2

        Mitesh Meswani added a comment - Targeting for 3.2


          • Assignee:
            Mitesh Meswani
            Sanjeeb Sahoo
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: