Skip to content

Remove more annotations from non-visible APIs #101

@cpovirk

Description

@cpovirk
  • Annotating them is more work, so we don't want to encourage more of that.
  • We already annotate them only incompletely, so we don't want the presence of annotations to suggest that we have been being complete.
  • Not only does annotating private APIs require more work up front, but even existing annotations have a cost because they complicate merges, as noted in cbe846f.
  • Even if we annotate private APIs correctly today, we can't rely on them to keep their current behavior even as reliably as public APIs do (which, as we know, is not 100% but should at least be highly reliable—and noteworthy when changes do occur).
    • [edit: I think this was a reference to behavior changes in System.console. However, I think we eventually concluded that System.console had technically remained @Nullable, even though the cases in which users could see null became much more restricted. We could also have the philosophical discussion about whether @Nullable can ever be truly "wrong" (as opposed to just a very imprecise and bad idea) in the return type of a static method :)]
  • I had forgotten about the crash we had from a change to an internal API back in Remove method-level Atomic annotations. #56.

[edit: done some in 300a39f]

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