Re: ArrayList grow method optimization and documentation improvement

2022-07-10 Thread Periklis Ntanasis
; -- > *Von:* core-libs-dev im Auftrag von > Periklis Ntanasis > *Gesendet:* Monday, July 11, 2022 12:20:27 AM > *An:* core-libs-dev@openjdk.org > *Betreff:* ArrayList grow method optimization and documentation > improvement > > Hi all, > > I was rea

Re: ArrayList grow method optimization and documentation improvement

2022-07-10 Thread Bernd Eckenfels
von Periklis Ntanasis Gesendet: Monday, July 11, 2022 12:20:27 AM An: core-libs-dev@openjdk.org Betreff: ArrayList grow method optimization and documentation improvement Hi all, I was reading the ArrayList source code and I think that the "private Object[] grow(int minCapacity)" m

ArrayList grow method optimization and documentation improvement

2022-07-10 Thread Periklis Ntanasis
Hi all, I was reading the ArrayList source code and I think that the "private Object[] grow(int minCapacity)" method does not work as it was intended by the author. Currently the method looks like this ( https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/util/ArrayList.ja