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

Ensure that field BigInteger.mag is not mutated after construction

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • Cause Known

      `BigInteger` is advertised as immutable.
      However, the method `largePrime()` mutates the final field `mag` on a new instance.
      While this seems harmless in this specific case, it would be better to make sure that `mag` is genuinely immutable.

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

              Created:
              Updated: