-
Notifications
You must be signed in to change notification settings - Fork 370
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
Handle Null Pointer Exception while trying to delete already deleted Authorized API #2607
Conversation
@@ -243,7 +243,7 @@ public void handleEvent(Event event) throws IdentityEventException { | |||
AuthorizedAPI authorizedAPI = OAuthComponentServiceHolder.getInstance() | |||
.getAuthorizedAPIManagementService() | |||
.getAuthorizedAPI(appId, apiId, tenantDomain); | |||
if (authorizedAPI.getScopes() == null) { | |||
if (null == authorizedAPI || authorizedAPI.getScopes() == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Could we consider changing this to
if (authorizedAPI == null || authorizedAPI.getScopes() == null) {
instead?
This approach is more commonly used in the codebase and may be slightly more readable.
Review Comment Link - [wso2-extensions#2607 (comment)]
PR builder started |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2607 +/- ##
============================================
- Coverage 56.23% 54.81% -1.43%
- Complexity 8128 8632 +504
============================================
Files 632 632
Lines 46158 49534 +3376
Branches 7771 8724 +953
============================================
+ Hits 25956 27150 +1194
- Misses 16478 18490 +2012
- Partials 3724 3894 +170
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
PR builder completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/11663312625
Purpose
Goals
Behavior After Fix: