Skip to content

Should other *Null annotations from Checker Framework be supported? #3

Closed

Description

@dzharkov

The question was initially asked by @kevin1e100:

Support something like @polynull? What about @MonotonicNonNull, @EnsuresNonNull, @EnsuresNonNullIf, …?

One can find the full list here: https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/

Activity

  1. dzharkov commented on Nov 26, 2018

    @dzharkov
    CollaboratorAuthor

    Comments from the document:

    [@amaembo] I would not introduce PolyNull eagerly. It’s very limited. In JetBrains we have much more powerful thing called Contract (see here) which can express much more (though also sometimes we want something which is not expressible via Contract). Of course I don’t suggest to add Contract as is, but adding such limited annotation as PolyNull without detailed consideration about possible needs may result in redundancy in future, like after a while we may introduce something more advanced which covers PolyNull case and PolyNull will become redundant. These advanced things should be thoroughly discussed, definitely not in the first release of our library.
    [@abreslav] The Kotlin team is also working on something around contracts, and I agree that @polynull is way quite limited. Let’s discuss the question of abstraction over nullability more.

  2. changed the title [-]Should be other *Null annotations from Checker Framework be supported?[/-] [+]Should other *Null annotations from Checker Framework be supported?[/+] on Nov 26, 2018
  3. kevinb9n commented on Nov 26, 2018

    @kevinb9n
    Collaborator

    Each annotation should only be considered on a case-by-case basis. Can we close this issue?

  4. added
    nullness
    on Nov 26, 2018
  5. kevin1e100 commented on Nov 26, 2018

    @kevin1e100
    Collaborator

    Separate issue per annotation sounds fine to me. However, my reading of the existing discussion is that we won't tackle any of these additional annotations initially. So I'm going to close this but if people want to discuss a particular annotation please open a separate issue for that annotation.

  6. kevinb9n commented on Jun 26, 2019

    @kevinb9n
    Collaborator

    Note that we have support for other annotations currently stated as a "optional requirement".

  7. cpovirk commented on Sep 23, 2019

    @cpovirk
    Collaborator

    FWIW, the Guava usages of @MonotonicNonNull I've seen so far have all been in lazy-initialization code, which works fine with plain @Nullable. I'll try to remember to report back if that changes.

    [edit: google/guava@559e1ac1359e8d5dc0941aa72691698185d65407]

    [edit: @MonotonicNonNull is now #300.]

  8. added
    design
    on Mar 13, 2024
  9. added this to the 0.3 milestone on Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    designnullness

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions