Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8075954

Cached jar file is uncompressed, so it may not result in same checksum as file on the web.



      When downloading a normal jar file, HttpDownloadHelper.decompressWrite() is called to take the ZipInputStream of the jar on the web and write to the JarOutputStream of the file in the cache.
      By doing this, then resulting file is a constant compression level (defaults to 0, and is settable in the JCP)

      DRS has added in 8u60 ability to define checksum for an unsigned file, but checksum is not constant, depending on compression used to store the file in the cache, and the compression used to create the jar file.

      So the code we have to get checksum of a jar file in the cache only works when JCP setting happens to equal setting used to create the file. This happens a lot (since JCP default is 0 - no compression, and jar tool default is the same), but with the attached jar (generated by NetBeans) you can see the checksum not working.


        1. cache.jar
          3 kB
        2. Checksum.java
          4 kB
        3. HelloWorld.jar
          3 kB



            • Assignee:
              herrick Andy Herrick
              herrick Andy Herrick
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: