if (providers == null)
if (providers != null)
  public static Enumeration getSaslServerFactories()  {    Vector result = new Vector();    HashSet names = new HashSet();    Provider[] providers = Security.getProviders();    Iterator it;    if (providers == null)      {        Provider p;        String key;        for (int i = 0; i < providers.length; i++)          {            p = providers[i];            for (it = p.keySet().iterator(); it.hasNext(); )              {                key = (String) it.next();                // add key's binding (a) it is a class of a server factory,                // and (b) the key does not include blanks                if (key.startsWith(SERVER_FACTORY_SVC) && key.indexOf(" ") == -1)                  {                    names.add(p.getProperty(key));                    break;                  }              }          }      }    // we have the factory class names in names; instantiate and enumerate    String c;    for (it = names.iterator(); it.hasNext(); )      {        c = (String) it.next();        try          {            SaslServerFactory f = (SaslServerFactory) Class.forName(c).newInstance();            if (f != null)              result.add(f);          }        catch (ClassCastException ignored) // ignore instantiation exceptions          {          }        catch (ClassNotFoundException ignored)          {          }        catch (InstantiationException ignored)          {          }        catch (IllegalAccessException ignored)          {          }      }    return result.elements();  }