Skip to content

Primitive data types should not be optionals #250

@danielkaneider

Description

@danielkaneider

Hi,
we're currently using OptionalProperties.all which isn't ideal for all cases. To be more specific:

  • primitives such as int getNumber() should not be optional
  • all other objects eg Integer getNumber() should be by default optional
  • eventually a NonNull annotation should be used to mark some returned Object as non-optional

If you want I can make a PR for that. I'd add an additional annotation OptionalProperties.default, which could easily cover the first two cases. For the last case we could either use the optionalAnnotations setting for the non-optional annotations, or create a new one nonOptionalAnnotations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions