Skip to content
Permalink
Browse files
In checkout(), catch ClassCastException for MultiSCMRevisionState
[FIXED JENKINS-27638]
  • Loading branch information
Brantone authored and rodrigc committed May 20, 2015
1 parent 39a2d3b commit b25484f2510db17c0200342e29a567c0ecd7903a
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/main/java/org/jenkinsci/plugins/multiplescms/MultiSCM.java
@@ -103,8 +103,13 @@ public void checkout(Run<?, ?> build, Launcher launcher,
FilePath workspace, TaskListener listener, File changelogFile, SCMRevisionState baseline)
throws IOException, InterruptedException {

MultiSCMRevisionState oldBaseline = (MultiSCMRevisionState) baseline;
MultiSCMRevisionState revisionState = new MultiSCMRevisionState();
MultiSCMRevisionState oldBaseline = null;
try {
oldBaseline = (MultiSCMRevisionState) baseline;
} catch (ClassCastException e) {
oldBaseline = new MultiSCMRevisionState();
}
MultiSCMRevisionState revisionState = new MultiSCMRevisionState();
build.addAction(revisionState);

HashSet<Object> scmActions = new HashSet<Object>();

0 comments on commit b25484f

Please sign in to comment.