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

ZipEncodingHelper calls System.getProperty("file.encoding"); should use Charset.defaultCharset()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.10
    • Component/s: None
    • Labels:
      None

      Description

      ZipEncodingHelper calls System.getProperty("file.encoding")
      However this can fail with a security exception.

      It should use Charset.defaultCharset() instead.
      This method also uses System.getProperty but does so as part of a doPrivileged block.
      AIUI this will be done in the protection domain of the JVM classes rather than the domain in which the Compress code runs, so should be less likely to fail.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: