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

Ensure permission in PermissionException is not null #1764

Merged

Conversation

ScoreUnder
Copy link
Contributor

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: NaN

Description

A null Permission is semantic nonsense: it is Permission.UNKNOWN but with extra steps (i.e. null checks). As such, it should not be allowed to propagate through a PermissionException. This PR enforces and encodes that.

@MinnDevelopment
Copy link
Member

MinnDevelopment commented Aug 5, 2021

Permission exceptions are not only used for missing permissions, that is what InsufficientPermissionException is used for. HierarchyException is also a permission error but is not caused by missing permissions. Nevermind, I see what you did here now. My bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants