Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-3

COMPRESS-REDESIGN: Handle JarArchiveInputStream null getNextEntry() gracefully

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • N/A

    Description

      When the method JarArchiveInputStream.getNextEntry() is called after the final archive entry was already returned, an Exception is thrown. This is due to the request to the super class ZipArchiveInputStream.getNextEntry() returning null which denotes the archive is at the end. However that null is used to attempt to try to create a new JarArchiveEntry(null) instance. It is here where the exception is thrown. I suggest doing a quick null check then return null if the archive has been fully traversed.

      Attachments

        1. JarArchiveInputStream.patch
          0.6 kB
          Tim Pinet
        2. JarTestCase.patch
          1.0 kB
          Tim Pinet

        Activity

          People

            tcurdt Torsten Curdt
            tjpinet Tim Pinet
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 10h
                10h
                Remaining:
                Remaining Estimate - 10h
                10h
                Logged:
                Time Spent - Not Specified
                Not Specified