This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/develop by this push:
new 14ae202 AIRAVATA-2663 Fix NPE in createProcesses
14ae202 is described below
commit 14ae2027f50ba0b30b112f181b32f2192f98f86c
Author: Marcus Christie <[email protected]>
AuthorDate: Thu Feb 1 12:48:53 2018 -0500
AIRAVATA-2663 Fix NPE in createProcesses
---
.../airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index 0d447b8..ff4a5e6 100644
---
a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -280,13 +280,14 @@ public class SimpleOrchestratorImpl extends
AbstractOrchestrator{
try {
ExperimentModel experimentModel =
registryClient.getExperiment(experimentId);
List<ProcessModel> processModels =
registryClient.getProcessList(experimentId);
- if (processModels.equals(null) || processModels.isEmpty()){
+ if (processModels == null || processModels.isEmpty()){
ProcessModel processModel =
ExperimentModelUtil.cloneProcessFromExperiment(experimentModel);
String processId = registryClient.addProcess(processModel,
experimentId);
processModel.setProcessId(processId);
+ processModels = new ArrayList<>();
processModels.add(processModel);
- return processModels;
}
+ return processModels;
} catch (Exception e) {
throw new OrchestratorException("Error during creating process",
e);
} finally {
@@ -294,7 +295,6 @@ public class SimpleOrchestratorImpl extends
AbstractOrchestrator{
ThriftUtils.close(registryClient);
}
}
- return null;
}
public String createAndSaveTasks(String gatewayId, ProcessModel
processModel, boolean autoSchedule) throws OrchestratorException {
--
To stop receiving notification emails like this one, please contact
[email protected].