private static List<KerberosIdentityDescriptor> componentIdentities(List<String> componentNames, KerberosServiceDescriptor serviceDescriptor) throws AmbariException {
    return componentNames.stream()
      .map(componentName -> serviceDescriptor.getComponent(componentName))
      .filter(Objects::nonNull)
      .flatMap(componentDescriptor -> componentDescriptor.getIdentitiesSkipReferences().stream())
      .collect(toList());
  }
Populates the identities with an empty list
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/RemovableIdentities.java