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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.10
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: