ProviderList removeInvalid ( ) { int n = loadAll ( ) ; if ( n == configs . length ) { return this ; } ProviderConfig [ ] newConfigs = new ProviderConfig [ n ] ; for ( int i = 0 , j = 0 ; i < configs . length ; i ++ ) { ProviderConfig config = configs [ i ] ; if ( config . isLoaded ( ) ) { newConfigs [ j ++ ] = config ; } } return new ProviderList ( newConfigs , true ) ; }
Try to load all Providers and return the ProviderList . If one or more Providers could not be loaded a new ProviderList with those entries removed is returned . Otherwise the method returns this .