提交 bd23782e 编写于 作者: K kohsuke

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
上级 c3adfaf7
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册