From 79939c458e96e0238c32f561dbdc13708ba4878e Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Mon, 31 Jan 2011 17:35:09 +0300 Subject: [PATCH] Change format of response from BatchResourcesServlet --- .../org/sonar/batch/bootstrapper/BatchDownloader.java | 10 ++++------ .../sonar/server/plugins/BatchResourcesServlet.java | 4 +--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BatchDownloader.java b/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BatchDownloader.java index 250559a0752..eead8dc6d5e 100644 --- a/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BatchDownloader.java +++ b/sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BatchDownloader.java @@ -76,12 +76,10 @@ public class BatchDownloader { String libs = remoteContent(BATCH_PATH); - for (String lib : libs.split("\n")) { - if (!"".equals(lib)) { - File file = new File(toDir, lib); - remoteContentToFile(BATCH_PATH + lib, file); - files.add(file); - } + for (String lib : libs.split(",")) { + File file = new File(toDir, lib); + remoteContentToFile(BATCH_PATH + lib, file); + files.add(file); } return files; diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/BatchResourcesServlet.java b/sonar-server/src/main/java/org/sonar/server/plugins/BatchResourcesServlet.java index 2a569a0d075..e8195a55ca4 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/BatchResourcesServlet.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/BatchResourcesServlet.java @@ -53,9 +53,7 @@ public class BatchResourcesServlet extends HttpServlet { try { response.setContentType("text/html"); writer = response.getWriter(); - for (String lib : getLibs()) { - writer.println(lib); - } + writer.print(StringUtils.join(getLibs(), ',')); } catch (IOException e) { LOG.error("Unable to provide list of batch resources", e); response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); -- 2.39.5