Skip to content

Commit

Permalink
Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
chamilaadhi committed Mar 18, 2024
1 parent 54585ee commit 184c012
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
import org.wso2.carbon.apimgt.impl.utils.ContentSearchResultNameComparator;
import org.wso2.carbon.apimgt.impl.utils.VHostUtils;
import org.wso2.carbon.apimgt.impl.workflow.ApplicationDeletionApprovalWorkflowExecutor;
import org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor;
import org.wso2.carbon.apimgt.impl.workflow.GeneralWorkflowResponse;
import org.wso2.carbon.apimgt.impl.workflow.WorkflowConstants;
import org.wso2.carbon.apimgt.impl.workflow.WorkflowException;
Expand Down Expand Up @@ -2357,6 +2358,10 @@ else if (APIConstants.API_KEY_TYPE_SANDBOX.equals(tokenType)) {
} else {
throw new APIManagementException("Invalid Token Type '" + tokenType + "' requested.");
}

if (appRegistrationWorkflow == null ) {
appRegistrationWorkflow = new ApplicationRegistrationSimpleWorkflowExecutor();

Check warning on line 2363 in components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java

View check run for this annotation

Codecov / codecov/patch

components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java#L2363

Added line #L2363 was not covered by tests
}

//check whether callback url is empty and set null
if (StringUtils.isBlank(callbackUrl)) {
Expand Down

0 comments on commit 184c012

Please sign in to comment.