mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 05:52:26 +00:00
Fixed the form submission error when there's no Ant or Maven configured.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@11170 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
c3adfaf74e
commit
bd23782e28
1 file changed
+3
-2
@@ -1575,8 +1575,9 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node,
|
||||
}
|
||||
|
||||
private boolean configureDescriptor(StaplerRequest req, JSONObject json, Descriptor<?> d) throws FormException {
|
||||
// collapse the structure to remain backward compatible with the JSON structure before 1.238
|
||||
JSONObject js = json.getJSONObject(d.getJsonSafeClassName());
|
||||
// collapse the structure to remain backward compatible with the JSON structure before 1.
|
||||
String name = d.getJsonSafeClassName();
|
||||
JSONObject js = json.has(name) ? json.getJSONObject(name) : new JSONObject(); // if it doesn't have the property, the method returns invalid null object.
|
||||
json.putAll(js);
|
||||
return d.configure(req, js);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user