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

Make GrowableArray capacity management work without default constructor

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 21
    • hotspot

      GrowableArray assumes that all data has a default ctr, see line 491:

        for ( ; i < this->_capacity; i++) ::new ((void*)&newData[i]) E();

      This is an unnecessary limitation which you hit when you try to limit your data structure to valid states.

            Unassigned Unassigned
            jsjolen Johan Sjölen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: