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

Enhance robustness of some j.m.BigInteger constructors

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 22
    • 8-pool, 11, 17, 21
    • core-libs
    • None
    • b24
    • Verified

    Description

      Class j.m.BigInteger exposes some constructors accepting byte array arguments. According to the specification, they assume that the arrays are not racily modified by other threads during construction. If that happens anyway, there's no guarantee about the externally visible value of the new instance.

      This change proposes to enhance the robustness of these constructors in the presence of racy modifications by improving guarantees on internal invariants. Like the current code, however, it ensures predictable outcomes to the caller only if the array is not modified during construction.

      Attachments

        Issue Links

          Activity

            People

              rgiulietti Raffaello Giulietti
              rgiulietti Raffaello Giulietti
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: