Skip to content

PermissionEvaluator targetDomainObject should be @Nullable #18259

@OrangeDog

Description

@OrangeDog

Describe the bug
Upgrading from 6.x to 7.0, the org.springframework.security.access package has now been @NullMarked.

The documentation for PermissionEvaluator#hasPermission(..., Object targetDomainObject, ...) says:

May be null in which case implementations should return false, as the null condition can be checked explicitly in the expression.

However, it is not marked @Nullable, so cases where it is null will cause analysis errors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions