String libs = remoteContent(BATCH_PATH);
- for (String lib : libs.split(",")) {
- File file = new File(toDir, lib);
- remoteContentToFile(BATCH_PATH + lib, file);
- files.add(file);
+ for (String lib : libs.split("\n")) {
+ if ("".equals(lib)) {
+ File file = new File(toDir, lib);
+ remoteContentToFile(BATCH_PATH + lib, file);
+ files.add(file);
+ }
}
return files;
if (StringUtils.isEmpty(resource)) {
PrintWriter writer = null;
try {
- String libs = StringUtils.join(getLibs(), ",");
response.setContentType("text/html");
writer = response.getWriter();
- writer.println(libs);
+ for (String lib : getLibs()) {
+ writer.println(lib);
+ }
} catch (IOException e) {
LOG.error("Unable to provide list of batch resources", e);
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);