Commons Compress
  1. Commons Compress
  2. COMPRESS-15

COMPRESS-REDESIGN: ArchiveStreamFactory does not handle exceptions for createArchiveInputStream(InputStream)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      N/A

      Description

      Reflection handles the checked exceptions for Constructor.newInstance() appropriately for:

      public ArchiveInputStream createArchiveInputStream( final String archiverName, final InputStream out ) throws ArchiveException

      {...}

      However, the other method:

      public ArchiveInputStream createArchiveInputStream( final InputStream input ) throws IOException {...}

      is not implemented to handle checked constructor exceptions since all Exception catches are not handled. It looks as though this method was not completed. This method should handle exceptions similar to its counterpart.

      1. patch-improve-factories.txt
        13 kB
        Christian Grobmeier
      2. ArchiveStreamFactory.patch
        6 kB
        Tim Pinet

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        93d 14h 11m 1 Torsten Curdt 07/Jan/09 13:16
        Dennis Lundberg made changes -
        Project Commons Sandbox [ 12310491 ] Commons Compress [ 12310904 ]
        Key SANDBOX-262 COMPRESS-15
        Component/s Compress [ 12311183 ]
        Torsten Curdt made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Torsten Curdt made changes -
        Assignee Torsten Curdt [ tcurdt ]
        Hide
        Christian Grobmeier added a comment -

        As discussed here:
        http://mail-archives.apache.org/mod_mbox/commons-dev/200810.mbox/%3C07071EEC-C9EB-40B3-B0B1-5D3306BE4013@apache.org%3E

        use of reflection might be a bit overkill. The patch from 2009-01-06 10:25 PM eliminates the reflection stuff from the codebase and makes everything a bit cleaner and easier to use.

        Show
        Christian Grobmeier added a comment - As discussed here: http://mail-archives.apache.org/mod_mbox/commons-dev/200810.mbox/%3C07071EEC-C9EB-40B3-B0B1-5D3306BE4013@apache.org%3E use of reflection might be a bit overkill. The patch from 2009-01-06 10:25 PM eliminates the reflection stuff from the codebase and makes everything a bit cleaner and easier to use.
        Christian Grobmeier made changes -
        Attachment patch-improve-factories.txt [ 12397271 ]
        Hide
        Christian Grobmeier added a comment -

        New patch which eliminates reflection usage in the compress and archiver-factories

        Show
        Christian Grobmeier added a comment - New patch which eliminates reflection usage in the compress and archiver-factories
        Tim Pinet made changes -
        Field Original Value New Value
        Attachment ArchiveStreamFactory.patch [ 12391506 ]
        Hide
        Tim Pinet added a comment -

        Attached patch throws exceptions properly. Also, cleaned up some strings in the class.

        Show
        Tim Pinet added a comment - Attached patch throws exceptions properly. Also, cleaned up some strings in the class.
        Tim Pinet created issue -

          People

          • Assignee:
            Torsten Curdt
            Reporter:
            Tim Pinet
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

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

                Development