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

java.util.jar.Attributes should use insertion-ordered iteration

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b42
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        java.util.jar.Attributes stores attributes (logically a Map) internally using a HashMap.
        It should use a LinkedHashMap instead, so that Attributes are output into a Manifest file in the order of insertion, because:
        - people increasingly want bit-for-bit repeatable builds, and hash order is unpredictable
        - some attributes are traditionally ordered in the Manifest file, e.g. people expect the manifest version to come first.

        The iteration order should be specified, but even if not, switching to some deterministic order is an improvement in the implementation.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                martin Martin Buchholz
                Reporter:
                martin Martin Buchholz
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: