private Map checkAndSetTrustedProviders(String realm,CircleOfTrustDescriptor cotDescriptor) throws COTException {
  Set tp=cotDescriptor.getTrustedProviders();
  Map map=null;
  if ((tp != null) && !tp.isEmpty()) {
    map=COTUtils.trustedProviderSetToProtocolMap(tp,realm);
    retainValidEntityIDs(map,COTConstants.SAML2,realm);
    retainValidEntityIDs(map,COTConstants.IDFF,realm);
    retainValidEntityIDs(map,COTConstants.WS_FED,realm);
  }
  return map;
}

private Map checkAndSetTrustedProviders ( String realm , CircleOfTrustDescriptor cotDescriptor ) throws COTException { Set tp = cotDescriptor . getTrustedProviders ( ) ; Map map = null ; if ( ( tp != null ) && ! tp . isEmpty ( ) ) { map = COTUtils . trustedProviderSetToProtocolMap ( tp , realm ) ; retainValidEntityIDs ( map , COTConstants . SAML2 , realm ) ; retainValidEntityIDs ( map , COTConstants . IDFF , realm ) ; retainValidEntityIDs ( map , COTConstants . WS_FED , realm ) ; } return map ; }
this method filters out invalid entities from the trusted provider list .
