package org.csstudio.platform.internal.jassauthentication.preference;

import java.util.ArrayList;
import java.util.List;

import javax.security.auth.login.AppConfigurationEntry;
import javax.security.auth.login.Configuration;

public class ConfigurationFromPreferences extends Configuration {	
	
	@Override
	public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
		List<AppConfigurationEntry> configEntryList = new ArrayList<AppConfigurationEntry>();
		
		JAASConfigurationEntry[] jaasConfigEntries = 
			PreferencesHelper.getJAASConfigurationEntries(false);
		
		for(JAASConfigurationEntry configEntry : jaasConfigEntries) {
			AppConfigurationEntry ace = new AppConfigurationEntry(
					configEntry.getLoginModuleName(),
					configEntry.getLoginModuleControlFlag(),
					configEntry.getModuleOptionsMap());
			configEntryList.add(ace);
		}
		
		return configEntryList.toArray(new AppConfigurationEntry[configEntryList.size()]);
	}

	@Override
	public void refresh() {
		super.refresh();
	}
}

@@ -982,29 +982,23 @@
 sh()
- %7B%0A%09%09super.refresh();
+%0A%09%7B%0A%09    // NOP
 %0A%09%7D%0A

remove JDK1.5 compiler error