public static int nextArrayOffset(AtomicReferenceArray<?> curr)
    {
        return length(curr) - 1;
    }
This method assumes index is actually (index << 1) because lower bit is used for resize hence the >> 1
jctools-core/src/main/java/org/jctools/queues/atomic/AtomicQueueUtil.java