Skip to content

Commit

Permalink
Merge pull request #12327 from chamilaadhi/npe
Browse files Browse the repository at this point in the history
Fix NPE
  • Loading branch information
chamilaadhi authored Mar 19, 2024
2 parents 54d6337 + 184c012 commit 211f15a
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 whether callback url is empty and set null
if (StringUtils.isBlank(callbackUrl)) {
Expand Down

0 comments on commit 211f15a

Please sign in to comment.