Annotation Interface UncheckedCanShrink
@Documented
@Retention(RUNTIME)
@Target({TYPE_USE,TYPE_PARAMETER})
@SubtypeOf(CanShrink.class)
public @interface UncheckedCanShrink
An expression of type
@UncheckedCanShrink 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 UncheckedCanShrink.
Thus, @UncheckedCanShrink is a combination of @CanShrink 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