Hi. If the next pointer is in the 0 position, then when you remove element, you must shift it into the size - 1 position. The error was that it shifts into a negative value and raised an IndexOutOfBoundsException, if i added a new element to the array.
I made a test that reproduces the error, and also made a patch that fixes it.
Hi. If the
next
pointer is in the0
position, then when you remove element, you must shift it into thesize - 1
position. The error was that it shifts into a negative value and raised anIndexOutOfBoundsException
, if i added a new element to the array. I made a test that reproduces the error, and also made a patch that fixes it.