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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • None
    • core-libs
    • b42
    • generic
    • generic
    • Verified

        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.

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

                Created:
                Updated:
                Resolved: