Skip to content
Permalink
Browse files
Merge pull request #25 from stephenc/jenkins-41453
[JENKINS-41453] Migration code was overly zealous
  • Loading branch information
stephenc committed Jan 25, 2017
2 parents a57e751 + fc32e1d commit 06fe724e36edd2ac13328cb94aa38d6e59b4333a
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/main/java/jenkins/scm/api/SCMHeadMigration.java
@@ -124,8 +124,8 @@ public SCMRevision migrate(@NonNull S source, @NonNull R revision) {
@NonNull
public static SCMHead readResolveSCMHead(@NonNull SCMSource source, @NonNull SCMHead head) {
for (SCMHeadMigration m : ExtensionList.lookup(SCMHeadMigration.class)) {
if (m.sourceClass.isInstance(source)
&& m.headClass.isInstance(head)) {
if (m.sourceClass == source.getClass()
&& m.headClass == head.getClass()) {
SCMHead migrated = m.migrate(source, head);
if (migrated != null) {
return migrated;
@@ -149,9 +149,9 @@ public static SCMRevision readResolveSCMRevision(@NonNull SCMSource source, @Che
}
SCMHead head = revision.getHead();
for (SCMHeadMigration m : ExtensionList.lookup(SCMHeadMigration.class)) {
if (m.sourceClass.isInstance(source)
&& m.headClass.isInstance(head)
&& m.revisionClass.isInstance(revision)) {
if (m.sourceClass == source.getClass()
&& m.headClass == head.getClass()
&& m.revisionClass == revision.getClass()) {
SCMRevision migrated = m.migrate(source, revision);
if (migrated != null) {
return migrated;

0 comments on commit 06fe724

Please sign in to comment.