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

push() on frozen array increases its length property

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 8u40
    • core-libs
    • None
    • b40
    • generic
    • generic

    Backports

      Description

        x = [1, 2, 3]; Object.freeze(x); x.push(4);
        <shell>:1 TypeError: Cannot set property "3" of frozen array
        jjs> x
        1,2,3,0
        jjs> x.length
        4

        x.length should still be 3.

        Attachments

          Issue Links

            Activity

              People

                lagergren Marcus Lagergren
                hannesw Hannes Wallnoefer
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: