mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
No need to show an option if there's only one choice.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9423 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
b29a6a1d73
commit
e544f4dbd5
2 files changed
+23
-18
No files matched your search
@@ -1534,7 +1534,9 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node,
|
||||
private <T extends Describable<T>> T newDescribedChild(StaplerRequest req, JSONObject j,
|
||||
String name, List<Descriptor<T>> descriptors)
|
||||
throws FormException {
|
||||
final String clazz = j.get(name + "Class").toString();
|
||||
|
||||
if(!j.has(name + "Class")) return null;
|
||||
final String clazz = j.getString(name + "Class");
|
||||
final JSONObject data = j.getJSONObject(name);
|
||||
j.remove(name + "Class");
|
||||
j.remove(name);
|
||||
|
||||
Reference in new issue
Block a user