Commons Compress
  1. Commons Compress
  2. COMPRESS-188

Improved Exceptionhandling for unsupported zip compression methods

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.1
    • Fix Version/s: 1.5
    • Component/s: Compressors
    • Labels:
      None

      Description

      If an unsupported zip compression methods, the created exception is not very helpfull for analysing why a zip archive could not be opend. Giving a name or description of the method can be very helpful.

      1. ZipMethod.java
        5 kB
        Harald Kuhn
      2. UnsupportedZipFeatureException.java.patch
        6 kB
        Harald Kuhn

        Activity

        Hide
        Stefan Bodewig added a comment -

        Oh, we used to require Java 1.4 compatibility up until Compress 1.3 and are at Java5 right now.

        Show
        Stefan Bodewig added a comment - Oh, we used to require Java 1.4 compatibility up until Compress 1.3 and are at Java5 right now.
        Hide
        Stefan Bodewig added a comment -

        slightly modified version of your patch went in with svn revision 1358814

        Thanks!

        Show
        Stefan Bodewig added a comment - slightly modified version of your patch went in with svn revision 1358814 Thanks!
        Hide
        Harald Kuhn added a comment -

        I was not sure on what java compatibility level the code was supposed to be so i made this java 4 combatible. I have converted my own version to an enum however so i now also attached an extended enum version. I did choose the radio button for license to ASF, however i hereby confirm that i license both the patch and the enum code to the ASF (Grant license to ASF for inclusion in ASF works - as per the Apache License §5). You are welcome!

        Show
        Harald Kuhn added a comment - I was not sure on what java compatibility level the code was supposed to be so i made this java 4 combatible. I have converted my own version to an enum however so i now also attached an extended enum version. I did choose the radio button for license to ASF, however i hereby confirm that i license both the patch and the enum code to the ASF (Grant license to ASF for inclusion in ASF works - as per the Apache License §5). You are welcome!
        Hide
        Harald Kuhn added a comment -

        Variant of ZipMethod as enum

        Show
        Harald Kuhn added a comment - Variant of ZipMethod as enum
        Hide
        Stefan Bodewig added a comment -

        I think ZipMethod could be an enum.

        I'm not sure whether you have checked the "license to the ASF" checkbox when attaching the file. There used to be a feather logo but I don't see one anymore. Could you please confirm you are licensing the path tothe ASF? Thanks.

        Show
        Stefan Bodewig added a comment - I think ZipMethod could be an enum. I'm not sure whether you have checked the "license to the ASF" checkbox when attaching the file. There used to be a feather logo but I don't see one anymore. Could you please confirm you are licensing the path tothe ASF? Thanks.
        Hide
        Harald Kuhn added a comment -

        For a project of my own, i created a enum style class for ZipMethods which contains methods i identified and names / descriptions for them and extended the UnsupportedZipFeatureException to use this names / descriptions for these features

        Show
        Harald Kuhn added a comment - For a project of my own, i created a enum style class for ZipMethods which contains methods i identified and names / descriptions for them and extended the UnsupportedZipFeatureException to use this names / descriptions for these features
        Hide
        Harald Kuhn added a comment -

        Patch for extended UnsupportedZipFeatureException
        with readable name for more commonly used methods

        Show
        Harald Kuhn added a comment - Patch for extended UnsupportedZipFeatureException with readable name for more commonly used methods

          People

          • Assignee:
            Unassigned
            Reporter:
            Harald Kuhn
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development