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.