airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [45/50] airavata git commit: checking bounds for experiment statuses when updating an experiment
Date Mon, 03 Apr 2017 16:50:18 GMT
checking bounds for experiment statuses when updating an experiment


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/6bc536f5
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/6bc536f5
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/6bc536f5

Branch: refs/heads/master
Commit: 6bc536f5915f8f95bd956fa50e9d3fb36a026892
Parents: 053df2f
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Tue Mar 28 14:02:26 2017 -0400
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Tue Mar 28 14:02:26 2017 -0400

----------------------------------------------------------------------
 .../core/experiment/catalog/impl/ExperimentRegistry.java  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/6bc536f5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
index 58c6f9e..d0bd650 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
@@ -630,10 +630,14 @@ public class ExperimentRegistry {
             if (experimentOutputs != null && !experimentOutputs.isEmpty()) {
                 updateExpOutputs(experimentOutputs, expId);
             }
-            ExperimentStatus experimentStatus = experiment.getExperimentStatus().get(0);
-            if (experimentStatus != null) {
-                updateExperimentStatus(experimentStatus, expId);
+
+            List<ExperimentStatus> experimentStatuses = experiment.getExperimentStatus();
+            if (experimentStatuses != null && experimentStatuses.size() > 0) {
+                if (experimentStatuses.get(0) != null) {
+                    updateExperimentStatus(experimentStatuses.get(0), expId);
+                }
             }
+
             List<ErrorModel> errors = experiment.getErrors();
             if (errors != null && !errors.isEmpty()) {
                 for (ErrorModel errror : errors) {


Mime
View raw message