ActionChangeRange (@NotNull DocumentReference reference) { LinkedList<ActionChangeRange> stack = getStack(reference); if (stack.isEmpty()) { throw new IllegalStateException("Cannot pop from empty stack"); } ActionChangeRange last = stack.removeLast(); trimInvalid(stack); return last; }