Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Request is marked nullable, so should be checked #2516

Merged
merged 5 commits into from
Jun 24, 2024

Conversation

timyates
Copy link
Collaborator

In the PermissionSecurityRule, the request object is annotated as Nullable, but we weren't testing for null.

This PR checks for null first of all.

I refactored the method into a optional flow which I hope is easier to read.

And then fixed the tests (we no longer call hasAnnotation as findAnnotation returns an optional, so provides enough info to continue)

In the PermissionSecurityRule, the request object is annotated as Nullable, but we weren't testing for null.

This PR checks for null first of all.

I refactored the method into a optional flow which I hope is easier to read.

And then fixed the tests (we no longer call hasAnnotation as findAnnotation returns an optional, so provides enough info to continue)
@timyates timyates self-assigned this Jun 18, 2024
@mkimberlin mkimberlin merged commit 471f110 into develop Jun 24, 2024
1 check passed
@mkimberlin mkimberlin deleted the bugfix-handle-null-request branch June 24, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants