Yes, as illustrated in section 2.1, you can write a cast:
String myvar = (@Untainted String) expr;
where "expr" has type @Tainted String.
This will result in a compile-time warning or error (depending on how you
have the checker configured). If you are sure the cast is acceptable, you
can suppress the warning:
@SuppressWarnings("tainting")
String myvar = (@Untainted String) expr;
You can also encapsulate this functionality in a method; for instance, the
Nullness Checker has a method called castNonNull. See
http://types.cs.washington.edu/checker-framework/current/doc/checkers/nullness/NullnessUtils.html#castNonNull%28T%29
-Michael Ernst
> an email to checker-framework-discuss+unsub...@googlegroups.com.