Skip to content

NullFree* annotations #1

@eparovyshnaya

Description

@eparovyshnaya
@NullFreeZone

annotation would be a nice way to publicly manifest intolerance to null in all it's forms and origins.

Implemented as with source retention and available for package/type/field/constructor/method , it can beget compile time errors for any null literal usages in the annotated code.

@NullFreeContract

as a weaker variant, would declare (and optionally contribute to JavaDoc) that

  • none of method s in scope can either accept null as a parameter or return it as a result
  • nont of field s in scope can be assigned to null

Metadata

Metadata

Assignees

Labels

meta: discussionNo actual code change is required, but other issues can be begotten

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions