for (File f : files) {
//the following property is required for initializing the password helper
System.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY, f.getAbsolutePath());
try {
final MasterPassword masterPasswordHelper = Globals.getDefaultHabitat().getComponent(MasterPassword.class, "Security SSL Password Provider Service");
final PasswordAdapter pa = masterPasswordHelper.getMasterPasswordAdapter();
final boolean exists = pa.aliasExists(alias);
if (exists) {
String mPass = getMasterPassword(f.getName());
masterPasswordHelper.setMasterPassword(mPass.toCharArray());
expandedPassword = masterPasswordHelper.getMasterPasswordAdapter().getPasswordForAlias(alias);
}
}
catch (Exception e) {
if (logger.isLoggable(Level.FINER)) {
logger.finer(StringUtils.cat(": ", alias, e.getMessage()));