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 2017/04/28 15:23:17 UTC

[36/50] [abbrv] airavata git commit: fixing bug in project and experiment search when the list is empty

fixing bug in project and experiment search when the list is empty


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

Branch: refs/heads/develop
Commit: 2fb19efccf804f4710cedcb1dad891e3cc9c4170
Parents: 1565881
Author: scnakandala <su...@gmail.com>
Authored: Tue Apr 25 17:20:39 2017 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Tue Apr 25 17:20:39 2017 -0400

----------------------------------------------------------------------
 .../core/experiment/catalog/resources/WorkerResource.java        | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/2fb19efc/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/WorkerResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/WorkerResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/WorkerResource.java
index 9154cae..1d2c6db 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/WorkerResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/WorkerResource.java
@@ -522,6 +522,8 @@ public class WorkerResource extends AbstractExpCatResource {
                 for (String id : accessibleIds)
                     query += ("'" + id + "'" + ",");
                 query = query.substring(0, query.length() - 1) + ") AND ";
+            }else{
+                return new ArrayList<>();
             }
 
             if (filters != null && filters.size() != 0) {
@@ -613,6 +615,8 @@ public class WorkerResource extends AbstractExpCatResource {
                 for (String id : accessibleIds)
                     query += ("'" + id + "'" + ",");
                 query = query.substring(0, query.length() - 1) + ") AND ";
+            }else{
+                return new ArrayList<>();
             }
 
             if (filters.get(ExperimentStatusConstants.STATE) != null) {