- rappInstance.getSme().getInvokerIds().forEach(this::deleteInvoker);
- rappInstance.getSme().getServiceApiIds()
- .forEach(s -> deletePublishApi(s, rappInstance.getSme().getApfId()));
- rappInstance.getSme().getProviderFunctionIds().forEach(this::deleteProviderFunc);
+ Optional.ofNullable(rappInstance.getSme().getInvokerIds())
+ .ifPresent(invokerList -> invokerList.forEach(this::deleteInvoker));
+ Optional.ofNullable(rappInstance.getSme().getServiceApiIds()).ifPresent(
+ serviceApiList -> serviceApiList.forEach(
+ s -> deletePublishApi(s, rappInstance.getSme().getApfId())));
+ Optional.ofNullable(rappInstance.getSme().getProviderFunctionIds())
+ .ifPresent(providerList -> providerList.forEach(this::deleteProviderFunc));