Skip to content
Permalink
Browse files

Merge pull request #135 from thomasgl-orange/fix-migrateCredentials-C…

…lassCastException

[JENKINS-30197] ClassCastException when migrating credentials
  • Loading branch information...
recena committed Aug 29, 2015
2 parents ab24371 + 4adfbde commit 606d95849828e2294fa372ddf9be6e0f90e5cb48
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/main/java/hudson/scm/SubversionSCM.java
@@ -1667,8 +1667,10 @@ public void load() {
File jobCredentials = new File(job.getRootDir(), "subversion.credentials");
if (jobCredentials.isFile()) {
try {
new PerJobCredentialStore(job).migrateCredentials(this);
job.save();
if (job.getScm() instanceof SubversionSCM) {
new PerJobCredentialStore(job).migrateCredentials(this);
job.save();
} // else: job is not using Subversion anymore
if (!jobCredentials.delete()) {
LOGGER.log(Level.WARNING, "Could not remove legacy per-job credentials store file: {0}", jobCredentials);
allOk = false;

0 comments on commit 606d958

Please sign in to comment.
You can’t perform that action at this time.