Skip to content
Permalink
Browse files

[JENKINS-35906] Ensure that SCMDescriptor.newInstance overrides are h…

…onored (#2426)

* [FIXED JENKINS-35906] Ensure that SCMDescriptor.newInstance overrides are honored.

* [FIXED JENKINS-36043] Work around fragile form submission design in multi-branch-project-plugin.

(cherry picked from commit 1d176d1)
  • Loading branch information
jglick authored and olivergondza committed Jul 1, 2016
1 parent 97c1cbd commit 27d8f06f1baabb320cc86527250bed5a7dacf85e
Showing with 4 additions and 1 deletion.
  1. +4 −1 core/src/main/java/hudson/scm/SCMS.java
@@ -56,7 +56,10 @@
*/
@SuppressWarnings("deprecation")
public static SCM parseSCM(StaplerRequest req, AbstractProject target) throws FormException, ServletException {
SCM scm = req.bindJSON(SCM.class, req.getSubmittedForm().getJSONObject("scm"));
SCM scm = SCM.all().newInstanceFromRadioList(req.getSubmittedForm().getJSONObject("scm"));
if (scm == null) {
scm = new NullSCM(); // JENKINS-36043 workaround for AbstractMultiBranchProject.submit
}
scm.getDescriptor().generation++;
return scm;
}

0 comments on commit 27d8f06

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