-
Notifications
You must be signed in to change notification settings - Fork 67
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 NPE in Organization Audience Shared Role Deletion #432
Fix NPE in Organization Audience Shared Role Deletion #432
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #432 +/- ##
============================================
- Coverage 48.77% 48.72% -0.06%
+ Complexity 1280 1258 -22
============================================
Files 143 144 +1
Lines 8024 7986 -38
Branches 979 990 +11
============================================
- Hits 3914 3891 -23
+ Misses 3785 3770 -15
Partials 325 325
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This is tested for the following flows
|
...org/wso2/carbon/identity/organization/management/handler/listener/SharedRoleMgtListener.java
Outdated
Show resolved
Hide resolved
b1acca8
to
b1959c9
Compare
0d33d3b
to
2209f97
Compare
Purpose
Fixes: wso2/product-is#22394
An NPE gets thrown when deleting Organization audience shared roles from an application. This is reproduced when switching the role audience to Application audience.
The NPE is thrown here, as the userRealm is null because the tenant flow hasn't started in the thread.
Approach
Started tenant flow before calling the
roleManagementService.getAssociatedApplicationByRoleId()
method.