for (final ResourceProviderHandler h : handlers) {
try {
this.getOrCreateProvider(h, control);
} catch ( final LoginException le ) {
for(final Map.Entry<ResourceProviderHandler, AuthenticatedResourceProvider> entry : this.contextMap.entrySet()) {
<BUG>if ( entry.getValue() != AuthenticatedResourceProvider.UNAUTHENTICATED_PROVIDER ) {
entry.getKey().getResourceProvider().logout(entry.getValue().getResolveContext().getProviderState());

}</BUG>
}

for (final ResourceProviderHandler h : handlers) {
try {
this.getOrCreateProvider(h, control);
} catch ( final LoginException le ) {
for(final Map.Entry<ResourceProviderHandler, AuthenticatedResourceProvider> entry : this.contextMap.entrySet()) {
if ( entry.getValue() != AuthenticatedResourceProvider.UNAUTHENTICATED_PROVIDER ) {
final ResourceProvider<Object> provider = entry.getKey().getResourceProvider();
if ( provider != null ) {
provider.logout(entry.getValue().getResolveContext().getProviderState());
}
}
}
