You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2020/02/21 06:26:14 UTC

[airavata] branch master updated: Fixing the issue of URL Collections are not properly decoding into command line arguments

This is an automated email from the ASF dual-hosted git repository.

dimuthuupe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/master by this push:
     new eba6ca3  Fixing the issue of URL Collections are not properly decoding into command line arguments
eba6ca3 is described below

commit eba6ca3f28b70ecaa7bff40155d2cb581c6218ac
Author: Dimuthu Wannipurage <di...@gmail.com>
AuthorDate: Fri Feb 21 01:25:57 2020 -0500

    Fixing the issue of URL Collections are not properly decoding into command line arguments
---
 .../impl/task/submission/config/GroovyMapBuilder.java     | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/config/GroovyMapBuilder.java b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/config/GroovyMapBuilder.java
index 412ad54..83b66d3 100644
--- a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/config/GroovyMapBuilder.java
+++ b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/config/GroovyMapBuilder.java
@@ -273,17 +273,12 @@ public class GroovyMapBuilder {
                     } else if (inputDataObjectType.getType() == DataType.URI_COLLECTION) {
                         String filePaths = inputDataObjectType.getValue();
                         String[] paths = filePaths.split(MULTIPLE_INPUTS_SPLITTER);
-                        String filePath;
-                        String inputs = "";
-                        int i = 0;
-                        for (; i < paths.length - 1; i++) {
-                            filePath = paths[i];
-                            filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
-                            // File names separate by a space
-                            inputs += filePath + " ";
+
+                        for (int i = 0; i < paths.length; i++) {
+                            paths[i] = paths[i].substring(paths[i].lastIndexOf(File.separatorChar) + 1);
                         }
-                        inputs += paths[i];
-                        inputValues.add(inputs);
+
+                        inputValues.add(String.join(" ", paths));
                     } else {
                         inputValues.add(inputDataObjectType.getValue());
                     }