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

Array.prototype.length doesn't work as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • core-libs
    • None
    • b115
    • generic
    • generic

      The length property of Array.prototype should behave like in an ordinary Array, i.e. it should be the value of the largest array key + 1. Currently it is not updated when inserting array keys:

      jjs> Array.prototype.length
      0
      jjs> Array.prototype[4] = 1;
      1
      jjs> Array.prototype.length
      0

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: