Skip to content

Introduce optimistic default  #1359

@aosen-xiong

Description

@aosen-xiong

In the following code,

class Unannotated {
  Object get() { return null; }
  void set(Object of) {}
}

@AnnotatedFor("nullness")
class AnnotatedUse {
  void use(Unannotated u) {
    u.get().toString();
    u.set(null);
  }
}

The usage of set will still produce a warning.

Introduce "optimistic" defaults for unannotated code - or a different mechanism, like using skipUses for uses of unannotated code.

Originally posted by @wmdietl in #1290 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions