-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed as not planned
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)
Description
Where possible, setter-getter-pairs where the getter is @Nullable should also tag the setter argument as @Nullable.
Mismatched nullabillity breaks property-style access from Kotlin. This must be so, because treating such a pair as a consistent property that is either nullable or not would result in unexpected NPEs during either writing or reading respectively
There are of course cases where setting to null should be disallowed, but usually (e.g. SimpleMailMessage) the setters simply assign to a backing variable, and the consequences of doing so with null are no different than leaving it uninitialised, and should be explicitly allowed.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)