]> source.dussan.org Git - sonarqube.git/commitdiff
Change format of response from BatchResourcesServlet
authorEvgeny Mandrikov <mandrikov@gmail.com>
Mon, 31 Jan 2011 14:35:09 +0000 (17:35 +0300)
committerEvgeny Mandrikov <mandrikov@gmail.com>
Mon, 31 Jan 2011 16:40:17 +0000 (19:40 +0300)
sonar-batch-bootstrapper/src/main/java/org/sonar/batch/bootstrapper/BatchDownloader.java
sonar-server/src/main/java/org/sonar/server/plugins/BatchResourcesServlet.java

index 250559a075239145f0a72955207dd53cf3f7545c..eead8dc6d5e5edb5450f6680b89a89efb1422410 100644 (file)
@@ -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;
index 2a569a0d075d9a257fd092665af9bf3863e97568..e8195a55ca41f9d3f55df90205385c213061891c 100644 (file)
@@ -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);