public final E[] getArray() {
        if (backingArray != null)
            return backingArray;

        if (buffer == null) {
            backingArray = createArray(0);
        } else {
            // Only keep the array or the buffer but never both at
            // the same time.  1) it saves space, 2) it keeps the rest
            // of the code safer.
            backingArray = buffer.toArray(createArray(buffer.size()));
            buffer = null;
        }
        return backingArray;
    }
Returns a current snapshot of this List's backing array that
 is guaranteed not to change through further List manipulation.
 Changes to this array may or may not be reflected in the list and
 should be avoided.

@return either the pre-existing array or a new one
jme3-core/src/main/java/com/jme3/util/SafeArrayList.java