You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/10/30 15:10:44 UTC

[airavata] 02/03: AIRAVATA-3234 check for null URI/URI_COLLECTION values

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

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

commit f007d5515c6775c762d42658128742b1700768d6
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Wed Oct 30 11:08:01 2019 -0400

    AIRAVATA-3234 check for null URI/URI_COLLECTION values
---
 .../airavata/orchestrator/server/OrchestratorServerHandler.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java b/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index fd7a670..15800ee 100644
--- a/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -183,7 +183,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface {
 					//FIXME Resolving replica if available. This is a very crude way of resolving input replicas. A full featured
 					//FIXME replica resolving logic should come here
 					processModel.getProcessInputs().stream().forEach(pi -> {
-						if (pi.getType().equals(DataType.URI) && pi.getValue().startsWith("airavata-dp://")) {
+						if (pi.getType().equals(DataType.URI) && pi.getValue() != null && pi.getValue().startsWith("airavata-dp://")) {
 							try {
 								DataProductModel dataProductModel = registryClient.getDataProduct(pi.getValue());
 								Optional<DataReplicaLocationModel> rpLocation = dataProductModel.getReplicaLocations()
@@ -200,7 +200,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface {
                             } catch (TException e) {
 								throw new RuntimeException("Error while launching experiment", e);
                             }
-                        } else if (pi.getType().equals(DataType.URI_COLLECTION) && pi.getValue().contains("airavata-dp://")) {
+                        } else if (pi.getType().equals(DataType.URI_COLLECTION) && pi.getValue() != null && pi.getValue().contains("airavata-dp://")) {
 							try {
 								String[] uriList = pi.getValue().split(",");
 								final ArrayList<String> filePathList = new ArrayList<>();