mayHaveLegacyPerJobCredentials = true;
for (Map.Entry<String, Credential> e : credentials.entrySet()) {
migrateCredentials(Jenkins.getInstance(), e.getKey(), e.getValue());
}
save();
bc.commit();
} catch (IOException e) {
LOGGER.log(Level.WARNING, "Could not migrate stored credentials", e);
} finally {
bc.abort();
}