Skip to content
Permalink
Browse files
[JENKINS-41453] Migration code was overly zealous
  • Loading branch information
stephenc committed Jan 25, 2017
1 parent a57e751 commit fc32e1df3f5c03701d87e432445ef636ef05cd02
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 fc32e1d

Please sign in to comment.