Skip to content

@Contract for SupplierUtils.resolve(Supplier) incorrectly declares !null -> !null #34987

Closed
@sbrannen

Description

@sbrannen

The nullability @Contract declaration for SupplierUtils.resolve(Supplier) currently declares !null -> !null.

However, invoking Supplier#get() can return null.

Thus, that part of the contract declaration is incorrect, which can lead to failures for nullability checks.

We should therefore remove that part of the contract.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions