@Documented @Retention(value=SOURCE) @Target(value={}) @SubtypeOf(value=UnknownVal.class) public @interface IntRangeFromPositive
IntRange
annotation whose from
field is 1
and whose to
field is Integer.MAX_VALUE
. However, this
annotation is derived from an org.checkerframework.checker.index.qual.Positive
annotation.
IntRangeFromPositive annotations derived from Positive annotations are used to create IntRange annotations, but IntRangeFromPositive annotations are not checked when they appear on the left hand side of expressions. Therefore, the Index Checker MUST be run on any code with @Positive annotations on the left-hand side of expressions, since the Value Checker will derive information from them but not check them.
It is an error to write this annotation directly. @Positive
or IntRange(from =
1, to = Integer.MAX_VALUE)
should always be written instead. This annotation is not retained in
bytecode, but is replaced with @UnknownVal
, so that it is not enforced on method
boundaries. The @Positive
annotation it replaced is retained in bytecode by the Lower
Bound Checker instead.