[Checkers] @Raw in the nullness type qualifier hierarchy

Michael Ernst mernst at cs.washington.edu
Sun May 24 18:01:56 EDT 2009


Mahmood-

Can you explain why @Raw appears in the nullness hierarchy between Nullable
and NonNull?

  @SubtypeOf( Nullable.class )
  public @interface Raw {

  @SubtypeOf( Raw.class )
  public @interface NonNull {

I would have expected rawness to be orthogonal to nullness -- and in fact
for field types to act a bit like our dependent types, in that the field is
nullable exactly if the containing object is @Raw.  Is there a benefit to
making this all one type hierarchy?  (I see that it enables one to cast
away rawness by casting to @NonNull, but that seems like a slightly obscure
way to cast away rawness.)

                     Thanks,

                    -Mike



More information about the checkers mailing list