Annotation Interface UncheckedShrinkable


An expression of type @UncheckedShrinkable may be used to remove elements, e.g., by calling remove() or clear() on it.

The Index Checker does not issue warnings about possible IndexOutOfBoundsExceptions when the collection has type UncheckedShrinkable.

Thus, @UncheckedShrinkable is combination of @Shrinkable and a warning suppression. It is particularly useful when first annotating a codebase, to temporarily suppress some warnings while focusing on others.

See the Checker Framework Manual:
Index Checker, Grow-only Checker