From b6ce03878ed7523878ceffdb69e699c19a941bfc Mon Sep 17 00:00:00 2001 From: Vincent Latombe Date: Fri, 7 Dec 2012 12:37:48 +0100 Subject: [PATCH] [JENKINS-16069] Remove wrapping of JSON with ( ) now it is done properly on Javascript side so the current server implementation triggers javascript errors. Result can be observed on DynamicComboBox within ui-samples-plugin --- changelog.html | 3 +++ core/src/main/java/hudson/util/ComboBoxModel.java | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.html b/changelog.html index 64761dfb21..b9bffb14e7 100644 --- a/changelog.html +++ b/changelog.html @@ -71,6 +71,9 @@ Upcoming changes (issue 1295)
  • Context menu and tooltip of the queue items were colliding with each other +
  • + Fix combobox ui component + (issue 16069) diff --git a/core/src/main/java/hudson/util/ComboBoxModel.java b/core/src/main/java/hudson/util/ComboBoxModel.java index cfbb351f6c..48351bc16b 100644 --- a/core/src/main/java/hudson/util/ComboBoxModel.java +++ b/core/src/main/java/hudson/util/ComboBoxModel.java @@ -62,8 +62,6 @@ public class ComboBoxModel extends ArrayList implements HttpResponse { public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException { rsp.setContentType(Flavor.JSON.contentType); PrintWriter w = rsp.getWriter(); - w.print('('); JSONArray.fromObject(this).write(w); - w.print(')'); } }