spring-security icon indicating copy to clipboard operation
spring-security copied to clipboard

PermissionEvaluator targetDomainObject should be @Nullable

Open OrangeDog opened this issue 1 month ago • 0 comments

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.

OrangeDog avatar Dec 03 '25 14:12 OrangeDog