Skip to content

Nullability annotations #1493

Description

@gavinking

I'm now very happy with how the use of jakarta.annotation.Nullable and jakarta.annotation.Nonnull has turned out in the persistence spec, and I think we should do something similar here. That is:

  • annotate methods and method parameters of Jakarta Data APIs with @Nullable or @Nonnull as appropriate, and even
  • encourage the developer to annotate repository methods and their parameters with these annotations, allowing the repository implementation to make use of the additional information (we already support this in Hibernate).

There's no real downside to any of this that I can see.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions