File tree Expand file tree Collapse file tree
modules/apis/src/main/java/com/axway/apim/apiimport/actions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .axway .apim .apiimport .actions ;
22
33import java .util .ArrayList ;
4- import java .util .List ;
54
65import org .slf4j .Logger ;
76import org .slf4j .LoggerFactory ;
@@ -26,12 +25,12 @@ public void execute(APIChangeState changes) throws AppException {
2625 Mode clientAppsMode = CoreParameters .getInstance ().getClientAppsMode ();
2726 Mode clientOrgsMode = CoreParameters .getInstance ().getClientOrgsMode ();
2827 // Get existing Orgs and Apps, as they will be lost when the API gets unpublished
29- if (clientAppsMode ==Mode .add && actualAPI .getApplications ()!=null ) {
28+ if (clientAppsMode ==Mode .add && actualAPI .getApplications ()!=null && changes . getDesiredAPI (). getApplications ()!= null ) {
3029 changes .getDesiredAPI ().getApplications ().addAll (actualAPI .getApplications ());
3130 // Reset the applications to have them re-created
3231 actualAPI .setApplications (new ArrayList <ClientApplication >());
3332 }
34- if (clientOrgsMode ==Mode .add && actualAPI .getClientOrganizations ()!=null ) {
33+ if (clientOrgsMode ==Mode .add && actualAPI .getClientOrganizations ()!=null && changes . getDesiredAPI (). getClientOrganizations ()!= null ) {
3534 // Take over existing organizations
3635 changes .getDesiredAPI ().getClientOrganizations ().addAll (actualAPI .getClientOrganizations ());
3736 // Delete them, so that they are re-created
You can’t perform that action at this time.
0 commit comments