Semmle QL Java standard library

An inferred bound on the runtime type of an expression can be either exact
or merely an upper bound. Bounds are only reported if they are likely to be
better than the static bound, which can happen either if an inferred exact
type has a subtype or if an inferred upper bound passed through at least one
explicit or implicit cast that lost type information.